diff options
author | Andy Dougherty <doughera@lafayette.edu> | 2019-01-31 14:05:41 -0500 |
---|---|---|
committer | Andy Dougherty <doughera@lafayette.edu> | 2019-01-31 14:05:41 -0500 |
commit | 04db542212fdad3a62f13afe741c99028f4bf799 (patch) | |
tree | ed1d41aee969b96cc4b00c5a77d39ca30a139934 /hints/linux.sh | |
parent | ba73a4cb8f472480a2d630613d1e9e1172d518d3 (diff) | |
download | perl-04db542212fdad3a62f13afe741c99028f4bf799.tar.gz |
Define _GNU_SOURCE if using the musl libc on linux.
Together with prior commits ba73a4cb8f, f8d82a1010, and 63c1fa6a98,
this should close [perl #133760].
Diffstat (limited to 'hints/linux.sh')
-rw-r--r-- | hints/linux.sh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/hints/linux.sh b/hints/linux.sh index 3f38ea07f1..a985a8ee1b 100644 --- a/hints/linux.sh +++ b/hints/linux.sh @@ -178,6 +178,16 @@ case "$plibpth" in ;; esac +# For the musl libc, perl should #define _GNU_SOURCE. Otherwise, some +# available functions, like memem, won't be used. See the discussion in +# [perl #133760]. musl doesn't offer an easy way to identify it, but, +# at least on alpine linux, the ldd --version output contains the +# string 'musl.' +case `ldd --version 2>&1` in + musl*) ccflags="$ccflags -D_GNU_SOURCE" ;; + *) ;; +esac + # libquadmath is sometimes installed as gcc internal library, # so contrary to our usual policy of *not* looking at gcc internal # directories we now *do* look at them, in case they contain |