diff options
author | Chris Packham <judge.packham@gmail.com> | 2020-10-07 20:03:16 +1300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-07 20:03:16 +1300 |
commit | 99ce9d38611d959076c7927ba3da428a28a54f76 (patch) | |
tree | c90094d7bcf18db4d6477a321c7b2627fbe98612 | |
parent | 364ed7aa96905920649d8be1455f136631f6cf5c (diff) | |
parent | 1c93176e0521945bac67f58724ba2bb450a74282 (diff) | |
download | crosstool-ng-99ce9d38611d959076c7927ba3da428a28a54f76.tar.gz crosstool-ng-99ce9d38611d959076c7927ba3da428a28a54f76.tar.bz2 crosstool-ng-99ce9d38611d959076c7927ba3da428a28a54f76.zip |
Merge pull request #1400 from fvalette/fix-m4-build-for-mingw32-host
m4: fix build for mingw32 host
-rw-r--r-- | scripts/build/companion_tools/100-m4.sh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/build/companion_tools/100-m4.sh b/scripts/build/companion_tools/100-m4.sh index 4bbe8d3c..7d9044f8 100644 --- a/scripts/build/companion_tools/100-m4.sh +++ b/scripts/build/companion_tools/100-m4.sh @@ -42,6 +42,7 @@ do_m4_backend() local prefix local cflags local ldflags + local libs for arg in "$@"; do eval "${arg// /\\ }" @@ -54,12 +55,19 @@ do_m4_backend() # it includes system <spawn.h> but expects a locally-built # posix_spawn(). ldflags="${ldflags} -lrt" + ;; + *-mingw32) + # m4 is built with stack smashing protection enabled which + # is not part of mingw-w64 c library in v7.0.0 and later. + libs="${libs} -lssp" + ;; esac CT_DoLog EXTRA "Configuring m4" CT_DoExecLog CFG \ CFLAGS="${cflags}" \ LDFLAGS="${ldflags}" \ + LIBS="${libs}" \ ${CONFIG_SHELL} \ "${CT_SRC_DIR}/m4/configure" \ --host="${host}" \ |