Loading build-chroot.sh +8 −2 Changes for build-chroot.sh: 8 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -244,6 +244,12 @@ gen_wrapper() { drv="--driver-mode=g++" fi inc="$inc -isystem $root$PREFIX/include -isystem $resdir/include" # --sysroot on links: -nostdlib drops crt/libs but NOT clang's default # -L search dirs, so without it a -lfoo absent from the sysroot silently # resolves to the host's /lib/x86_64-linux-gnu/libfoo.so (glibc-built). # That made cmlibarchive's CHECK_LIBRARY_EXISTS(md) pass via the host's # libmd while find_library() saw nothing -> LIBMD_LIBRARY-NOTFOUND. local ldroot="--sysroot=${root:-/}" cat >"$out" <<EOF #!/bin/sh Loading @@ -269,7 +275,7 @@ if [ \$mode = compile ]; then fi # -nostdlib (e.g. a libc linking itself): only the caller's own objects if [ \$startfiles = 0 ] && [ \$libs = 0 ]; then exec "$clang" $drv $inc $ldextra "\$@" exec "$clang" $drv $inc $ldroot $ldextra "\$@" fi if [ \$startfiles = 0 ]; then [ \$pie = 1 ] && [ \$shared = 0 ] && [ \$static = 0 ] && set -- -pie "\$@" Loading @@ -284,7 +290,7 @@ else fi [ \$libs = 1 ] && set -- "\$@" -L"\$LIB" -lc "$builtins" [ \$startfiles = 1 ] && set -- "\$@" "\$LIB/crtn.o" exec "$clang" $drv $inc -nostdlib $ldextra \\ exec "$clang" $drv $inc -nostdlib $ldroot $ldextra \\ -Wl,--hash-style=sysv -Wl,--dynamic-linker=$INTERP -Wl,-rpath-link,"\$LIB" "\$@" EOF chmod +x "$out" Loading build-cross.sh +5 −2 Changes for build-cross.sh: 5 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -250,6 +250,9 @@ gen_wrapper() { root="${WRAP_ROOT-$SYSROOT}" tflags="${WRAP_TFLAGS-$TFLAGS}" builtins="${WRAP_BUILTINS:-$BUILTINS}" local inc="$tflags -fPIC -nostdinc -cxx-isystem $root$PREFIX/include/cxx -isystem $root$PREFIX/include -isystem $resdir/include" local TFLAGS="$tflags" BUILTINS="$builtins" # --sysroot on links: keeps clang's default -L dirs out of the host's # /lib (see build-chroot.sh gen_wrapper) local ldroot="--sysroot=${root:-/}" cat >"$out" <<EOF #!/bin/sh # generated by systempp build-cross.sh -- clang driver for systempp on $TRIPLE Loading @@ -274,7 +277,7 @@ if [ \$mode = compile ]; then exec "$clang" $drv $inc "\$@" fi if [ \$startfiles = 0 ] && [ \$libs = 0 ]; then exec "$clang" $drv $inc -fuse-ld=lld "\$@" exec "$clang" $drv $inc $ldroot -fuse-ld=lld "\$@" fi if [ \$startfiles = 0 ]; then [ \$pie = 1 ] && [ \$shared = 0 ] && [ \$static = 0 ] && set -- -pie "\$@" Loading @@ -289,7 +292,7 @@ else fi [ \$libs = 1 ] && set -- "\$@" -L"\$LIB" -lc "$BUILTINS" [ \$startfiles = 1 ] && set -- "\$@" "\$LIB/crtn.o" exec "$clang" $drv $inc -nostdlib -fuse-ld=lld \\ exec "$clang" $drv $inc -nostdlib $ldroot -fuse-ld=lld \\ -Wl,--hash-style=sysv -Wl,--dynamic-linker=$INTERP -Wl,-rpath-link,"\$LIB" "\$@" EOF chmod +x "$out" Loading Loading
build-chroot.sh +8 −2 Changes for build-chroot.sh: 8 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -244,6 +244,12 @@ gen_wrapper() { drv="--driver-mode=g++" fi inc="$inc -isystem $root$PREFIX/include -isystem $resdir/include" # --sysroot on links: -nostdlib drops crt/libs but NOT clang's default # -L search dirs, so without it a -lfoo absent from the sysroot silently # resolves to the host's /lib/x86_64-linux-gnu/libfoo.so (glibc-built). # That made cmlibarchive's CHECK_LIBRARY_EXISTS(md) pass via the host's # libmd while find_library() saw nothing -> LIBMD_LIBRARY-NOTFOUND. local ldroot="--sysroot=${root:-/}" cat >"$out" <<EOF #!/bin/sh Loading @@ -269,7 +275,7 @@ if [ \$mode = compile ]; then fi # -nostdlib (e.g. a libc linking itself): only the caller's own objects if [ \$startfiles = 0 ] && [ \$libs = 0 ]; then exec "$clang" $drv $inc $ldextra "\$@" exec "$clang" $drv $inc $ldroot $ldextra "\$@" fi if [ \$startfiles = 0 ]; then [ \$pie = 1 ] && [ \$shared = 0 ] && [ \$static = 0 ] && set -- -pie "\$@" Loading @@ -284,7 +290,7 @@ else fi [ \$libs = 1 ] && set -- "\$@" -L"\$LIB" -lc "$builtins" [ \$startfiles = 1 ] && set -- "\$@" "\$LIB/crtn.o" exec "$clang" $drv $inc -nostdlib $ldextra \\ exec "$clang" $drv $inc -nostdlib $ldroot $ldextra \\ -Wl,--hash-style=sysv -Wl,--dynamic-linker=$INTERP -Wl,-rpath-link,"\$LIB" "\$@" EOF chmod +x "$out" Loading
build-cross.sh +5 −2 Changes for build-cross.sh: 5 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -250,6 +250,9 @@ gen_wrapper() { root="${WRAP_ROOT-$SYSROOT}" tflags="${WRAP_TFLAGS-$TFLAGS}" builtins="${WRAP_BUILTINS:-$BUILTINS}" local inc="$tflags -fPIC -nostdinc -cxx-isystem $root$PREFIX/include/cxx -isystem $root$PREFIX/include -isystem $resdir/include" local TFLAGS="$tflags" BUILTINS="$builtins" # --sysroot on links: keeps clang's default -L dirs out of the host's # /lib (see build-chroot.sh gen_wrapper) local ldroot="--sysroot=${root:-/}" cat >"$out" <<EOF #!/bin/sh # generated by systempp build-cross.sh -- clang driver for systempp on $TRIPLE Loading @@ -274,7 +277,7 @@ if [ \$mode = compile ]; then exec "$clang" $drv $inc "\$@" fi if [ \$startfiles = 0 ] && [ \$libs = 0 ]; then exec "$clang" $drv $inc -fuse-ld=lld "\$@" exec "$clang" $drv $inc $ldroot -fuse-ld=lld "\$@" fi if [ \$startfiles = 0 ]; then [ \$pie = 1 ] && [ \$shared = 0 ] && [ \$static = 0 ] && set -- -pie "\$@" Loading @@ -289,7 +292,7 @@ else fi [ \$libs = 1 ] && set -- "\$@" -L"\$LIB" -lc "$BUILTINS" [ \$startfiles = 1 ] && set -- "\$@" "\$LIB/crtn.o" exec "$clang" $drv $inc -nostdlib -fuse-ld=lld \\ exec "$clang" $drv $inc -nostdlib $ldroot -fuse-ld=lld \\ -Wl,--hash-style=sysv -Wl,--dynamic-linker=$INTERP -Wl,-rpath-link,"\$LIB" "\$@" EOF chmod +x "$out" Loading