Mercurial > hg > aboriginal
changeset 1675:a87931846137
Have ccwrap autodetect which dynamic linker to use, musl's or uClibc's.
Give musl a ld-musl.so.0 symlink so we can tell which libc we're using.
author | Rob Landley <rob@landley.net> |
---|---|
date | Sun, 17 Aug 2014 13:03:48 -0500 |
parents | 263bb9ff9657 |
children | 0f4499211cfa |
files | sources/sections/ccwrap.sh sources/sections/musl.build |
diffstat | 2 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/sources/sections/ccwrap.sh Sun Aug 17 13:00:20 2014 -0500 +++ b/sources/sections/ccwrap.sh Sun Aug 17 13:03:48 2014 -0500 @@ -9,7 +9,7 @@ mkdir -p "$STAGE_DIR/bin" && "$TEMP" "$SOURCES/toys/ccwrap.c" -Os $CFLAGS \ - -o "$STAGE_DIR/bin/${TOOLCHAIN_PREFIX}cc" $STATIC_FLAGS && + -o "$STAGE_DIR/bin/${TOOLCHAIN_PREFIX}cc" $STATIC_FLAGS -DDYNAMIC_LINKER=\"/lib/$(cd $STAGE_DIR/lib; ls ld-*.so.0)\" && echo -e "#!/bin/bash\n\n${TOOLCHAIN_PREFIX}cc -E "'"$@"' \ > "$STAGE_DIR/bin/${TOOLCHAIN_PREFIX}cpp" && chmod +x "$STAGE_DIR/bin/${TOOLCHAIN_PREFIX}cpp" || dienow
--- a/sources/sections/musl.build Sun Aug 17 13:00:20 2014 -0500 +++ b/sources/sections/musl.build Sun Aug 17 13:03:48 2014 -0500 @@ -1,4 +1,5 @@ # Build and install musl CC= CROSS_COMPILE=${ARCH}- ./configure --prefix=/ && -DESTDIR="$STAGE_DIR" make -j $CPUS CROSS_COMPILE=${ARCH}- all install +DESTDIR="$STAGE_DIR" make -j $CPUS CROSS_COMPILE=${ARCH}- all install && +ln -s libc.so "$STAGE_DIR/lib/ld-musl.so.0"