aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorNorbert Lange <nolange79@gmail.com>2019-10-19 00:09:01 +0200
committerChris Packham <judge.packham@gmail.com>2023-09-24 16:10:02 +1300
commitdc82a2bfac6d8113a042d698a3efe566af65dbb4 (patch)
tree6557fad3ef853ae83edd965793998d73863820d3 /scripts
parentc91133acc18c62814b8954fb9dfdff8f6e1e6fdc (diff)
downloadcrosstool-ng-dc82a2bfac6d8113a042d698a3efe566af65dbb4.tar.gz
crosstool-ng-dc82a2bfac6d8113a042d698a3efe566af65dbb4.tar.bz2
crosstool-ng-dc82a2bfac6d8113a042d698a3efe566af65dbb4.zip
Add a musl variable LIBC_MUSC_EXTRA_CFLAGS
Signed-off-by: Norbert Lange <nolange79@gmail.com>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/build/libc/musl.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/scripts/build/libc/musl.sh b/scripts/build/libc/musl.sh
index bc2a2e64..6e12e86b 100644
--- a/scripts/build/libc/musl.sh
+++ b/scripts/build/libc/musl.sh
@@ -29,6 +29,7 @@ musl_backend_once()
local src_dir="${CT_SRC_DIR}/musl"
local multi_dir multi_os_dir multi_root multi_flags multi_index multi_count
local multilib_dir
+ local musl_cflags
local hdr_install_subdir
local arg f l
@@ -42,7 +43,9 @@ musl_backend_once()
CT_SanitizeVarDir multilib_dir
CT_DoExecLog ALL mkdir -p "${multi_root}${multilib_dir}"
- extra_cflags=( ${multi_flags} )
+ musl_cflags+=" ${CT_ALL_TARGET_CFLAGS}"
+ musl_cflags+=" ${CT_LIBC_MUSL_EXTRA_CFLAGS}"
+ musl_cflags+=" ${multi_flags}"
if [ "${CT_LIBC_MUSL_DEBUG}" = "y" ]; then
extra_config+=("--enable-debug")
@@ -74,7 +77,7 @@ musl_backend_once()
# host : same as --target
# target : the machine musl runs on
CT_DoExecLog CFG \
- CFLAGS="${CT_TARGET_CFLAGS} ${extra_cflags[*]}" \
+ CFLAGS="${musl_cflags}" \
LDFLAGS="${CT_TARGET_LDFLAGS}" \
CROSS_COMPILE="${CT_TARGET}-" \
${CONFIG_SHELL} \