Fix duplicate symbol __clzsi2
Looks like our tests weren't quite testing compiler-builtins when it was compiled with unmangled symbols, so update the tests to catch this and then fix the compilation of the `__clzsi2` intrinsic to use the C version if it's compiled.
This commit is contained in:
parent
045de6e516
commit
752e35a11f
|
@ -42,6 +42,10 @@ else
|
||||||
$run --release
|
$run --release
|
||||||
$run --features c
|
$run --features c
|
||||||
$run --features c --release
|
$run --features c --release
|
||||||
|
cargo build --target $1
|
||||||
|
cargo build --target $1 --release
|
||||||
|
cargo build --target $1 --features c
|
||||||
|
cargo build --target $1 --release --features c
|
||||||
fi
|
fi
|
||||||
|
|
||||||
PREFIX=$(echo $1 | sed -e 's/unknown-//')-
|
PREFIX=$(echo $1 | sed -e 's/unknown-//')-
|
||||||
|
@ -68,6 +72,10 @@ fi
|
||||||
# Look out for duplicated symbols when we include the compiler-rt (C) implementation
|
# Look out for duplicated symbols when we include the compiler-rt (C) implementation
|
||||||
for rlib in $(echo $path); do
|
for rlib in $(echo $path); do
|
||||||
set +x
|
set +x
|
||||||
|
echo "================================================================"
|
||||||
|
echo checking $rlib for duplicate symbols
|
||||||
|
echo "================================================================"
|
||||||
|
|
||||||
stdout=$($PREFIX$NM -g --defined-only $rlib 2>&1)
|
stdout=$($PREFIX$NM -g --defined-only $rlib 2>&1)
|
||||||
|
|
||||||
# NOTE On i586, It's normal that the get_pc_thunk symbol appears several
|
# NOTE On i586, It's normal that the get_pc_thunk symbol appears several
|
||||||
|
@ -86,6 +94,7 @@ for rlib in $(echo $path); do
|
||||||
if test $? = 0; then
|
if test $? = 0; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
set -ex
|
set -ex
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
|
@ -302,6 +302,7 @@ impl_wide_int!(u32, u64, 32);
|
||||||
impl_wide_int!(u64, u128, 64);
|
impl_wide_int!(u64, u128, 64);
|
||||||
|
|
||||||
intrinsics! {
|
intrinsics! {
|
||||||
|
#[use_c_shim_if(/* always if C compilation is enabled */)]
|
||||||
#[cfg(any(
|
#[cfg(any(
|
||||||
target_pointer_width = "16",
|
target_pointer_width = "16",
|
||||||
target_pointer_width = "32",
|
target_pointer_width = "32",
|
||||||
|
|
Loading…
Reference in New Issue