Commit Graph

18 Commits

Author SHA1 Message Date
Ross Burton
53f16a9939 site: remove glib site values
GLib 1.x is incredibly obsolete and GLib 2.x is built using Meson
not autotools, so we can remove the GLib entries from the site files.

Also fix a few copy/paste typos where glib_ was used incorrectly, for example:

  ac_cv_sizeof_ptrdiff_t=${glib_cv_sizeof_ptrdiff_t=4}

The glib_cv_ should be ac_cv_.

(From OE-Core rev: 69e757e6bef8b1037e2f23121774af1d5f6c96df)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-02-19 07:47:53 +00:00
Khem Raj
ce46662692 site/common-musl: Set ac_cv_sys_file_offset_bits default to 64
off_t is always 64bit on musl regardless of 32bit or 64bit
architectures. autoconf has AC_SYS_LARGEFILE to detect correct off_t
size but it only work with glibc since it defines feature macros
_FILE_OFFSET_BITS=64 and _LARGEFILE_SOURCE but these macros are
not used on musl headers.

(From OE-Core rev: 09b3e8417d362b75f3b43a5a97b47700f97bf643)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Nicolas Dechesne <nicolas.dechesne@linaro.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-01-12 23:08:58 +00:00
Khem Raj
9353730a6b bash: build with bash_cv_getcwd_malloc=yes on musl too
This fixes bash using its own broken getcwd() during cross compiling
The configure script assumes that your getcwd() function is broken.
Which then makes bash use it's own getcwd() implementation, which
doesn't work if the path to the current directory
contains bind mounts in its paths. This shows up as:

Fixes errors on musl images like
shell-init: error retrieving current directory: getcwd: cannot access parent directories: Bad file descriptor

(From OE-Core rev: 2137f68f6e84b669b5aba8f12237f164f710dba2)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-05-15 08:57:16 +01:00
Khem Raj
887fa42d44 site/common-musl: Enable qsort_r in glib
musl now has qsort_r

(From OE-Core rev: 35065c75bdb4725745ecc8b41fe920b6dc81f1e1)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-11-01 10:41:18 +00:00
Khem Raj
94b1d77472 site: Make sys_siglist default to no
glibc 2.32 has deprecated sys_siglist [1]

since no is default for musl as well, therefore elevate it to common
site file for all

[1] https://sourceware.org/git/?p=glibc.git;a=commit;h=b1ccfc061feee9ce616444ded8e1cd5acf9fa97f

(From OE-Core rev: 7c19f30849e9a73a7497d8e6c4719a2e57017086)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-07-22 23:47:57 +01:00
André Draszik
34c7222e1d site: musl and glibc have working mktime()
This coreutils (gnulib) test tests for various bugs that only
exist in ancient versions.

It defaults to assuming buggy behaviour with its own implementation
when cross-compiling.

musl and recent glibc (2.29) are not affected.

(From OE-Core rev: 65d38cc1ce5a106c4c2e5068b8440eb6e5a2b33e)

Signed-off-by: André Draszik <git@andred.net>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-01-11 09:19:20 +00:00
André Draszik
39abf8342b site: strtod() works in glibc / musl
autoconf has a test for strtod(), which assumes non-working
when cross-compiling, but it does work in both musl and
recent glibc.

coreutils (gnulib) does some additional tests on top of that,
but assumes working glibc when >= 2.8 when cross compiling.
It doesn't know about musl where the additional tests also
work, though.

(From OE-Core rev: c8429f707d9ac785f295492470ec8b9ff56c043b)

Signed-off-by: André Draszik <git@andred.net>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-01-11 09:19:20 +00:00
André Draszik
a88dfc0ee8 site: set nanosleep() behaviour for glibc / musl
As per coreutils' (gnulib's) autotools test, nanosleep()
misbehaves on glibc (2.29), and works fine on musl.

During cross-compile, recent coreutils assume brokenness
when compiling for linux, which pessimises musl.

Set the correct result for musl, and for coherency reasons,
also specify the result for glibc.

(From OE-Core rev: 4522648758dc59f5ece736a0c1c0e95dcc7dafd1)

Signed-off-by: André Draszik <git@andred.net>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-01-11 09:19:20 +00:00
André Draszik
56c6dde17b site: musl and glibc have working utimes()
This coreutils / gnulib autoconf test is for a broken glibc
implementation of utimes from 2003-07-12 to 2003-09-17.

(From OE-Core rev: a60ca6048cc3a4fef862b128a842c70ac0cd2253)

Signed-off-by: André Draszik <git@andred.net>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-01-11 09:19:20 +00:00
André Draszik
a127c4df0d site: musl and glibc have working getgroups()
recent coreutils (gnulib) assume yes when cross-compiling
for gnu (glibc), but don't know about musl.
For coherence, just set the result to yes for both.

Note that the old coreutils (from meta-gplv2) doesn't
assume anything and instead that recipe hard-codes to yes.
So behaviour with yocto when using meta-gplv2 is actually
better than when using the latest version (when using musl).

This patch rectifies this shortcoming.

(From OE-Core rev: 692fe85264e599eb659456bd2eebf5f12a1cd30f)

Signed-off-by: André Draszik <git@andred.net>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-01-11 09:19:20 +00:00
André Draszik
f50911e245 site: set getcwd() test result for abort()-bug for glibc / musl
This coreutils (gnulib) test checks for an abort() that existed
in glibc before 2.4.90-10 (in 2006) in certain conditions.

Neither libraries exhibit this problem today.

(From OE-Core rev: 506c3b5adaa2fdffa051d83fb99efc00e432156b)

Signed-off-by: André Draszik <git@andred.net>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-01-11 09:19:20 +00:00
André Draszik
a1a0fa1317 site: set getcwd() behaviour for long paths for glibc / musl
In glibc, getcwd() handles long file names properly, on
musl, getcwd() only works up to PATH_MAX directory depths.

Configuring the autotools (gnulib) test result here allows
coreutils to compile more optimised code for both platforms,
rather than being pessimistic and re-implementing everything
itself.

The difference in behaviour is because both do the kernel
getcwd syscall (which only supports up to PATH_MAX), but
glibc implements fallbacks for longer paths, while musl
doesn't.

(From OE-Core rev: 525e33cf99983ee4bc3cf1822364123551aa7c83)

Signed-off-by: André Draszik <git@andred.net>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-01-11 09:19:20 +00:00
André Draszik
e594841ef5 site: musl and glibc have glibc compatible getcwd()
I.e. allocate memory for the pointer returned when the first
argument is NULL.

(From OE-Core rev: fe148da36af2dc086e05e2ebc1c088f1b5485de2)

Signed-off-by: André Draszik <git@andred.net>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-01-11 09:19:20 +00:00
André Draszik
3f1455887a site: musl and glibc have glibc compatible calloc()
calloc (N, S) returns non-NULL when N*S is zero,
and returns NULL when N*S overflows.

(From OE-Core rev: ba2bc4b6529013a303dd67abe944ceb619e7466c)

Signed-off-by: André Draszik <git@andred.net>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-01-11 09:19:20 +00:00
André Draszik
8eec7e14db site: musl and glibc have working mkstemp()
their mkstemp() passes all tests from the gnulib m4 macro
gl_FUNC_MKSTEMP.

(From OE-Core rev: 2b0905d25fa295fc868bf6df1da89283b9dc1f45)

Signed-off-by: André Draszik <git@andred.net>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-01-11 09:19:20 +00:00
André Draszik
fe141ba944 site: musl has working memcmp()
I.e. a memcmp() that is 8bit clean (like glibc).

(From OE-Core rev: d938ca1b8bc715047d771907c6ea4a1c9aa6594f)

Signed-off-by: André Draszik <git@andred.net>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-01-11 09:19:20 +00:00
Ross Burton
2d40119e11 site: consolidate ac_cv_func_mmap_fixed_mapped definitions
This is the cache variable used by AC_FUNC_MMAP, which is possibly one of the
worst autoconf macros to exist.

Apart from being a runtime test which silently claims that mmap() is broken when
cross-compiling, this is basically to verify that mmap() actually works, because
SVR4.0 (released 1988) was broken.  Thirty years later, everyone has a working
mmap().

common-glibc already has an assignment, so add a corresponding assignment to
common-musl and remove it from the machine-specific files.

(From OE-Core rev: 93dd7c87cef4fd9c22a09857fb55218c8be87b5b)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-10 22:45:18 +00:00
Khem Raj
56d4f91fe2 siteinfo, insane: Recognize musl specific triplets
We will use '-musl' to identify musl based systems
this patch lays the foundation for recognising those
and map them to internal variable representations

(From OE-Core rev: 9cd77aed67373e33dc69158ab02b94d7045c1119)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-01 14:29:29 +01:00