summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoakim Sindholt <opensource@zhasha.com>2017-07-25 10:24:51 +0200
committerJoakim Sindholt <opensource@zhasha.com>2017-07-25 10:24:51 +0200
commit2c58e9fd414cdeaa1210b30976f1f8748e10c9eb (patch)
tree199c09073623661682cfc01f7f635c721b11263b
parent7253479cfe0cbd56ce3cd08b408c2c7e5bc7cfcd (diff)
build-libc: implicitly set UTF-8 locale before running main
-rw-r--r--bin/build-libc.sh1
1 files changed, 1 insertions, 0 deletions
diff --git a/bin/build-libc.sh b/bin/build-libc.sh
index be979f4..8d27753 100644
--- a/bin/build-libc.sh
+++ b/bin/build-libc.sh
@@ -33,6 +33,7 @@ Linux)
--enable-warnings \
--enable-visibility && \
echo 'obj/src/stdio/vfprintf.lo: CFLAGS += -fno-inline' >> config.mak && \
+ echo 'obj/src/env/__libc_start_main.lo: CFLAGS += -include locale.h -D"main(...)=(setlocale(LC_CTYPE, \"C.UTF-8\"), main(__VA_ARGS__))"' >> config.mak && \
make -j$NJOBS && \
make install && \
echo "$MUSLREV" > "$OBJDIR/musl-revision" || exit 2