Skip to content
This repository has been archived by the owner on Nov 3, 2022. It is now read-only.

Commit

Permalink
toolchain/musl: enable musl and sync sync with r46986
Browse files Browse the repository at this point in the history
This is another hacky commit that should be reverted before
merging upstream (the DD release).
  • Loading branch information
sairon committed Nov 11, 2015
1 parent b8494be commit 76c03af
Show file tree
Hide file tree
Showing 16 changed files with 382 additions and 2,031 deletions.
4 changes: 2 additions & 2 deletions config/Config-build.in
Original file line number Diff line number Diff line change
Expand Up @@ -226,11 +226,11 @@ menu "Global build settings"
bool "None"
config PKG_CC_STACKPROTECTOR_REGULAR
bool "Regular"
select SSP_SUPPORT
select SSP_SUPPORT if !USE_MUSL
depends on KERNEL_CC_STACKPROTECTOR_REGULAR
config PKG_CC_STACKPROTECTOR_STRONG
bool "Strong"
select SSP_SUPPORT
select SSP_SUPPORT if !USE_MUSL
depends on GCC_VERSION_4_9_LINARO
depends on KERNEL_CC_STACKPROTECTOR_STRONG
endchoice
Expand Down
2 changes: 1 addition & 1 deletion package/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ ifdef CONFIG_USE_MKLIBS
--sysroot $(STAGING_DIR_ROOT) \
`cat $(TMP_DIR)/mklibs-libs | sed 's:/*[^/]\+/*$$::' | uniq | sed 's:^$(STAGING_DIR_ROOT):-L :'` \
--ldlib $(patsubst $(STAGING_DIR_ROOT)/%,/%,$(firstword $(wildcard \
$(foreach name,ld-uClibc.so.* ld-linux.so.* ld-*.so, \
$(foreach name,ld-uClibc.so.* ld-linux.so.* ld-*.so ld-musl-*.so.*, \
$(STAGING_DIR_ROOT)/lib/$(name) \
)))) \
--target $(REAL_GNU_TARGET_NAME) \
Expand Down
1 change: 0 additions & 1 deletion toolchain/Config.in
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,6 @@ choice
config LIBC_USE_MUSL
select USE_MUSL
bool "Use musl"
depends on BROKEN
depends on !(mips64 || mips64el)

endchoice
Expand Down
1 change: 1 addition & 0 deletions toolchain/gcc/Config.in
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ choice
config GCC_USE_VERSION_4_9_LINARO
select GCC_VERSION_4_9_LINARO
bool "gcc 4.9.x with Linaro enhancements"
depends on BROKEN

endchoice

Expand Down
4 changes: 2 additions & 2 deletions toolchain/gcc/patches/4.8-linaro/203-musl_powerpc.patch
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld64.so.1"
#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0"
#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"
+#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-powerpc.so.1"
+#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-powerpc%{msoft-float:-sf}.so.1"
+#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-powerpc64.so.1"
#if DEFAULT_LIBC == LIBC_UCLIBC
-#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}"
Expand Down Expand Up @@ -72,7 +72,7 @@

#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-powerpc.so.1"
+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-powerpc%{msoft-float:-sf}.so.1"
#if DEFAULT_LIBC == LIBC_UCLIBC
-#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}"
+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}"
Expand Down
13 changes: 13 additions & 0 deletions toolchain/gcc/patches/4.8-linaro/230-musl_libssp.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
--- gcc-4.8.1/gcc/gcc.c.orig 2013-09-24 06:27:32.133894539 +0000
+++ gcc-4.8.1/gcc/gcc.c 2013-09-24 06:29:35.790562854 +0000
@@ -656,7 +656,9 @@
#endif

#ifndef LINK_SSP_SPEC
-#ifdef TARGET_LIBC_PROVIDES_SSP
+#if DEFAULT_LIBC == LIBC_MUSL
+#define LINK_SSP_SPEC "-lssp_nonshared"
+#elif defined(TARGET_LIBC_PROVIDES_SSP)
#define LINK_SSP_SPEC "%{fstack-protector:}"
#else
#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all:-lssp_nonshared -lssp}"
4 changes: 2 additions & 2 deletions toolchain/gcc/patches/4.9-linaro/203-musl_powerpc.patch
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#endif
#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0"
#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"
+#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-powerpc.so.1"
+#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-powerpc%{msoft-float:-sf}.so.1"
+#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-powerpc64.so.1"
#if DEFAULT_LIBC == LIBC_UCLIBC
-#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}"
Expand Down Expand Up @@ -72,7 +72,7 @@

#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-powerpc.so.1"
+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-powerpc%{msoft-float:-sf}.so.1"
#if DEFAULT_LIBC == LIBC_UCLIBC
-#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}"
+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}"
Expand Down
2 changes: 1 addition & 1 deletion toolchain/musl/Config.version
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ if USE_MUSL
config MUSL_VERSION
string
depends on USE_MUSL
default "1.1.9"
default "1.1.11"

endif
2 changes: 1 addition & 1 deletion toolchain/musl/common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ PKG_NAME:=musl
PKG_VERSION:=$(call qstrip,$(CONFIG_MUSL_VERSION))
PKG_RELEASE=1

PKG_MD5SUM:=14e8c5ac74f887d53256b3dcaf9b4aaa
PKG_MD5SUM:=48be0777e32f374d387e9cf85e36ec4d

PKG_SOURCE_URL:=http://www.musl-libc.org/releases
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
Expand Down
Loading

0 comments on commit 76c03af

Please sign in to comment.