diff options
author | Alexey Neyman <stilor@att.net> | 2017-01-28 13:33:43 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-28 13:33:43 -0800 |
commit | d0682f9ad5492ea541edb77d1c39d82144477b8a (patch) | |
tree | 80adb198f805f8c2b8057dc12c03dd557a5062af /scripts/build/arch/mips.sh | |
parent | 0636034688b0d03577ae1b543c92ebab90d14c68 (diff) | |
parent | d7b043e360dbf261ddb97accf5c454d3cf88f92e (diff) | |
download | crosstool-ng-d0682f9ad5492ea541edb77d1c39d82144477b8a.tar.gz crosstool-ng-d0682f9ad5492ea541edb77d1c39d82144477b8a.tar.bz2 crosstool-ng-d0682f9ad5492ea541edb77d1c39d82144477b8a.zip |
Merge pull request #563 from stilor/musl-mips-refix
Add a workaround for musl in build scripts
Diffstat (limited to 'scripts/build/arch/mips.sh')
-rw-r--r-- | scripts/build/arch/mips.sh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/scripts/build/arch/mips.sh b/scripts/build/arch/mips.sh index 6097c89f..f91a80a0 100644 --- a/scripts/build/arch/mips.sh +++ b/scripts/build/arch/mips.sh @@ -69,3 +69,22 @@ CT_DoArchUClibcCflags() { esac done } + +CT_DoArchMUSLPostInstall() { + # GDB and MUSL maintainers seem to disagree on whether <sgidefs.h> + # is to be provided as a part of C library. GDB guys think it is + # a C library responsibility, while MUSL authors think GDB should + # not be using <sgidefs.h>. Neither side is willing to reach out + # to the other and negotiate the needed changes, and I don't want + # to play the middle man. Hence, provide our own wrapper for + # for <sgidefs.h> - the only solution short of telling MUSL users + # stop using it. This is why MUSL is experimental in ct-ng and + # will likely remain in that status. + # References: + # http://www.openwall.com/lists/musl/2017/01/26/2 + # https://sourceware.org/ml/gdb-patches/2017-01/msg00469.html + # https://www.sourceware.org/ml/libc-alpha/2004-11/msg00034.html + if [ ! -r "${CT_HEADERS_DIR}/sgidefs.h" ]; then + echo "#include <asm/sgidefs.h> // Redirected by ct-ng" > "${CT_HEADERS_DIR}/sgidefs.h" + fi +} |