summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoakim Sindholt <opensource@zhasha.com>2015-06-05 22:39:00 +0200
committerJoakim Sindholt <opensource@zhasha.com>2015-06-05 22:39:00 +0200
commit4ec003ffd36359fa5477bf40b8275a1b29450770 (patch)
tree2f2502df4a971d26be2551fa8f9f1266c78aeaed
parent3e82275d9de881807c622fef3b58ac4fd55e289c (diff)
fix regression in compiler-rt build
-rw-r--r--bin/p9l.sh6
-rw-r--r--src/clang_linux_builtin_386.mk5
-rw-r--r--src/clang_linux_builtin_amd64.mk3
-rw-r--r--src/clang_linux_builtin_arm.mk5
4 files changed, 12 insertions, 7 deletions
diff --git a/bin/p9l.sh b/bin/p9l.sh
index 3f758c3..70711bb 100644
--- a/bin/p9l.sh
+++ b/bin/p9l.sh
@@ -169,6 +169,9 @@ do
IFS="$saveifs"
done
+# add compiler-rt regardless
+LIBS+=("${LIBDIR}/libcompiler_rt.a")
+
CRTSTART=()
CRTEND=()
@@ -187,8 +190,7 @@ ld.gold \
--gc-sections -pie -Bstatic -Bsymbolic -E -X -e "${START_SYM}" \
-z now -z nodlopen -z nodump -z nodelete -z noexecstack -z text \
-nostdlib "${LTOOPTS[@]}" -L"${LIBDIR}" "${OPTS[@]}" -o "${OUTPUT_NAME}" \
- "${CRTSTART[@]}" '-(' "${FARGS[@]}" "${LIBS[@]}" '-)' "${CRTEND[@]}" \
- -lc -lrt -lpthread -lcompiler_rt "${GLOBALLIBS[@]}"
+ "${CRTSTART[@]}" '-(' "${FARGS[@]}" "${LIBS[@]}" '-)' "${CRTEND[@]}"
if [ $? -ne 0 ]; then exit 1; fi
perl -- "${DIR}/nuke-pt_interp.pl" "${OUTPUT_NAME}"
diff --git a/src/clang_linux_builtin_386.mk b/src/clang_linux_builtin_386.mk
index 0ce45a7..aac85ac 100644
--- a/src/clang_linux_builtin_386.mk
+++ b/src/clang_linux_builtin_386.mk
@@ -7,9 +7,10 @@ Arch := unknown
Configs := builtins-i386
CFLAGS := -Wall -Werror -O3 -fomit-frame-pointer -fPIE -ftls-model=local-exec \
- -integrated-as --sysroot=$(ProjSrcRoot)/../../386 -isystem /include
+ -integrated-as --sysroot=$(ProjSrcRoot)/../../386 -isystem /include \
+ -include $(ProjSrcRoot)/../visibility.h
-Arch.builtins-i386 := i686
+Arch.builtins-i386 := i386
CFLAGS.builtins-i386 := $(CFLAGS) -target i686-linux-gnu
FUNCTIONS.builtins-i386 := $(CommonFunctions) $(ArchFunctions.i386)
diff --git a/src/clang_linux_builtin_amd64.mk b/src/clang_linux_builtin_amd64.mk
index 3505bed..708f47c 100644
--- a/src/clang_linux_builtin_amd64.mk
+++ b/src/clang_linux_builtin_amd64.mk
@@ -7,7 +7,8 @@ Arch := unknown
Configs := builtins-x86_64
CFLAGS := -Wall -Werror -O3 -fomit-frame-pointer -fPIE -ftls-model=local-exec \
- -integrated-as --sysroot=$(ProjSrcRoot)/../../amd64 -isystem /include
+ -integrated-as --sysroot=$(ProjSrcRoot)/../../amd64 -isystem /include \
+ -include $(ProjSrcRoot)/../visibility.h
Arch.builtins-x86_64 := x86_64
CFLAGS.builtins-x86_64 := $(CFLAGS) -target x86_64-linux-gnu
diff --git a/src/clang_linux_builtin_arm.mk b/src/clang_linux_builtin_arm.mk
index c4cf2a2..ec90e0d 100644
--- a/src/clang_linux_builtin_arm.mk
+++ b/src/clang_linux_builtin_arm.mk
@@ -7,11 +7,12 @@ Arch := unknown
Configs := builtins-arm
CFLAGS := -Wall -Werror -O3 -fomit-frame-pointer -fPIE -ftls-model=local-exec \
- -integrated-as --sysroot=$(ProjSrcRoot)/../../arm -isystem /include
+ -integrated-as --sysroot=$(ProjSrcRoot)/../../arm -isystem /include \
+ -include $(ProjSrcRoot)/../visibility.h
Arch.builtins-arm := armv7
CFLAGS.builtins-arm := $(CFLAGS) -target armv7a-linux-eabi
-FUNCTIONS.builtins-arm := $(CommonFunctions) $(ArchFunctions.arm)
+FUNCTIONS.builtins-arm := $(CommonFunctions) $(ArchFunctions.armv7)
# Always use optimized variants.
OPTIMIZED := 1