mirror of
https://git.musl-libc.org/git/musl
synced 2025-04-01 07:22:57 +03:00
add LIBCC (compiler runtime) logic and override to configure
this should both fix the issue with ARM needing -lgcc_eh (although that's really a bug in the libgcc build process that's causing considerable bloat, which should be fixed) and make it easier to build musl using clang/llvm in place of gcc. unfortunately I don't know a good way to detect and support pcc's -lpcc since it's not in pcc's default library search path...
This commit is contained in:
parent
c87584a3e9
commit
2c1cd2399a
7
configure
vendored
7
configure
vendored
@ -34,6 +34,7 @@ Some influential environment variables:
|
|||||||
CC C compiler command [detected]
|
CC C compiler command [detected]
|
||||||
CFLAGS C compiler flags [-Os -pipe ...]
|
CFLAGS C compiler flags [-Os -pipe ...]
|
||||||
CROSS_COMPILE prefix for cross compiler and tools [none]
|
CROSS_COMPILE prefix for cross compiler and tools [none]
|
||||||
|
LIBCC compiler runtime library [detected]
|
||||||
|
|
||||||
Use these variables to override the choices made by configure.
|
Use these variables to override the choices made by configure.
|
||||||
|
|
||||||
@ -128,6 +129,7 @@ CFLAGS=*) CFLAGS=${arg#*=} ;;
|
|||||||
CPPFLAGS=*) CPPFLAGS=${arg#*=} ;;
|
CPPFLAGS=*) CPPFLAGS=${arg#*=} ;;
|
||||||
LDFLAGS=*) LDFLAGS=${arg#*=} ;;
|
LDFLAGS=*) LDFLAGS=${arg#*=} ;;
|
||||||
CROSS_COMPILE=*) CROSS_COMPILE=${arg#*=} ;;
|
CROSS_COMPILE=*) CROSS_COMPILE=${arg#*=} ;;
|
||||||
|
LIBCC=*) LIBCC=${arg#*=} ;;
|
||||||
*=*) ;;
|
*=*) ;;
|
||||||
*) target=$arg ;;
|
*) target=$arg ;;
|
||||||
esac
|
esac
|
||||||
@ -286,6 +288,10 @@ printf "warning: disabling dynamic linking support\n"
|
|||||||
shared=no
|
shared=no
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Find compiler runtime library
|
||||||
|
test -z "$LIBCC" && tryldflag LIBCC -lgcc && tryldflag LIBCC -lgcc_eh
|
||||||
|
test -z "$LIBCC" && tryldflag LIBCC -lcompiler_rt
|
||||||
|
printf "using compiler runtime libraries: %s\n" "$LIBCC"
|
||||||
|
|
||||||
|
|
||||||
printf "creating config.mak... "
|
printf "creating config.mak... "
|
||||||
@ -309,6 +315,7 @@ CFLAGS_C99FSE = $CFLAGS_C99FSE
|
|||||||
CPPFLAGS = $CPPFLAGS
|
CPPFLAGS = $CPPFLAGS
|
||||||
LDFLAGS = $LDFLAGS_AUTO $LDFLAGS
|
LDFLAGS = $LDFLAGS_AUTO $LDFLAGS
|
||||||
CROSS_COMPILE = $CROSS_COMPILE
|
CROSS_COMPILE = $CROSS_COMPILE
|
||||||
|
LIBCC = $LIBCC
|
||||||
EOF
|
EOF
|
||||||
test "x$static" = xno && echo "STATIC_LIBS ="
|
test "x$static" = xno && echo "STATIC_LIBS ="
|
||||||
test "x$shared" = xno && echo "SHARED_LIBS ="
|
test "x$shared" = xno && echo "SHARED_LIBS ="
|
||||||
|
Loading…
x
Reference in New Issue
Block a user