Commit Graph

16 Commits

Author SHA1 Message Date
Ross Burton
0c7190686c autotools: require that a configure script exists
There's no point inheriting autotools if you're not actually going to
run a configure script, so make a missing configure script fatal.

(From OE-Core rev: 6d327a39befae44a88a812bdf4acde800dcee57b)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-03-18 11:25:36 +00:00
Ross Burton
a4b1fa2b22 autotools: don't try and find in-tree macros
autotools has improved a lot since this class was written, and there's
now no need to search the source tree for m4 files and add them to the
include path.

If packages have macros in subdirectories the idiom is to tell aclocal
via an assignment in Makefile.am:

  ACLOCAL_AMFLAGS = -I gl/m4 -I m4

If, for example, a package isn't autoreconfable out of the box (because
it has a non-trivial autogen.sh or similar, say) then the required -I
statements can be added to EXTRA_AUTORECONF.

(From OE-Core rev: e718d1be2c4fb54cf363c23f929358e1be68c724)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-02-27 10:55:16 +00:00
Richard Purdie
c2da016918 meta/meta-selftest: Fix variable assignment whitespace
Recipes are much more readable with whitespace around the assignment operators.
Fix various assignments in OE-Core to show this is definitely the preferred
formatting.

(From OE-Core rev: 30ea609d3357fb3de911f2f6a5e6856c151b976a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-02-01 13:42:34 +00:00
Ross Burton
9902db8e99 autoconf: rename autotools_aclocals and only run in do_configure
Despite the name, autotools_aclocals() doesn't actually do anything with
aclocal. Instead it reads all of the available autoconf site default
files[1] and sets CONFIG_SITE appropriately. Rename the function to
autotools_sitefiles to make this clear.

Also there's no need to do this before do_configure or do_install, as
the variable is only checked when configure runs.

[1] https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Site-Defaults.html

(From OE-Core rev: 05080b48a9607e19a251c7396c1b06f08d98ed3b)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-01-20 13:38:59 +00:00
Ross Burton
3bb1ccd945 autotools: clean up aclocal/ search path assignments
We need aclocal to look in two different $datadir/aclocal/ directories:
the native (eg, for pkg.m4 from pkgconfig) and the target (eg, for
alsa.m4 from alsa-lib).

aclocal doesn't directly support this pattern, currently we use
--system-acdir to specify the target directory and then add the native
directory to the user include list.

However, since automake 1.17 there is also an --aclocal-path option to
augument the search list.  As the relocated aclocal from automake-native
already knows the correct path for the native aclocal directory we can
use --aclocal-path to add the correct target aclocal directory.

For simplicity I don't bother only doing this in non-native builds as
this just adds the same path to the search twice.

This removes ACLOCALDIR and ACLOCALEXTRAPATH. Recipes using these to
add search paths should instead use EXTRA_AUTORECONF += "-I path".

(From OE-Core rev: 878e1517d4890b31332a506ce903d57e1d7dff87)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-01-20 13:38:59 +00:00
Ross Burton
a619a39d15 autotools: remove aclocal --automake-acdir, relocated so knows the right path
A relocated aclocal in the native sysroot has the right paths already:

$ cat /work/ross/build/tmp/work/cortexa57-poky-linux/expect/5.45.4/recipe-sysroot-native/usr/bin/aclocal
my @automake_includes = ('/work/ross/build/tmp/work/cortexa57-poky-linux/expect/5.45.4/recipe-sysroot-native/usr/share/aclocal-' . $APIVERSION);

Thus there is no need to tell aclocal the path explicitly.

(From OE-Core rev: 002e03132b8ba1f1b254c8a63ff70db2a5d16518)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-01-10 11:23:45 +00:00
Ross Burton
9c7c3fe0ab autotools: log when we're removing aclocal.m4
Some mysterious autotools errors are because upstream has a custom
aclocal.m4 that we're deleting it unless we know we're not even running
aclocal.  There's a case to be made for removing this deletion logic
on the grounds that aclocal should know what it is doing, but for now
make it clear that we're deleting a file by saying so in the task log.

(From OE-Core rev: d6efd938af8a8260ae464edf4388afea73293ec7)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-01-10 11:23:45 +00:00
Alexander Kanavin
c76f119db8 gettext: update 0.22.5 -> 0.23.1
Drop patches:
parallel.patch
(obsolete as no .a files are installed)

0001-intl-Fix-build-failure-with-make-j.patch
(backport)

Gettext no longer installs anything into $libdir/gettext by default
but still creates the directory and so it should be packaged.

(From OE-Core rev: a414f47009811fa6886e43fd2b4c928a906a65f3)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-01-04 12:34:03 +00:00
Richard Purdie
b4e430a42e autotools/libtool: Drop libtool sysroot patch as not needed
libtool auto detects the sysroot from gcc's parameters or configuration so we
don't need to pass in this configuration separately to libtool.

Whilst the option names do conflict with gcc/binutils, that is an issue for those
projects to resolve, not us. Upstream libtool did reject the patch. We can
drop this patch and simplify our code.

(From OE-Core rev: 7c8553f81bccc3e8c2bb1116ee1e89f5f8af4c9e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-06-04 12:04:52 +01:00
Richard Purdie
6b9eb4e9f0 siteconfig: Drop siteconfig class/code/support
The siteconfig code was only used for 5 cache values. The complexity added to sstate
to support this code was considerable and the runtime much more significant than
any benefit the cache files would have added. Drop the support for this which
was only used minimally for ncurses and zlib.

(From OE-Core rev: f3766dc038f7ba9780ddaf5eb8d27385ea31d7d0)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-05-31 16:58:36 +01:00
Jörg Sommer
f785a323ae autotools: update link in comment for cross compiling
(From OE-Core rev: bc0a28203334a5925a8f3ea2b955a4cdad87c4c9)

Signed-off-by: Jörg Sommer <joerg.sommer@navimatix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-04-04 14:05:03 +01:00
Ross Burton
3dc895804f autotools: don't exclude gtkdocize
gtkdocize can now be ran successfully from autoreconf, so there's no
need to exclude it and run it manually.

(From OE-Core rev: 891ec38d4c5cc5ac7bc34938276261ebd6f6d54e)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-12 11:54:05 +00:00
Ross Burton
3c72b2d711 autotools: append to EXTRA_AUTORECONF
Inherit order may mean that this class is inherited after assignments,
so extend instead of assign EXTRA_AUTORECONF.

(From OE-Core rev: 83958b4bdea90a0bb9331d33c2f266900a108fee)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-12 11:54:05 +00:00
Richard Purdie
0769e8ef6b bitbake.conf: Drop oldincludedir
Autoconf defines this as:

"The directory for installing C header files for non-GCC compilers."

Whilst this is something autoconf does allow changing, I find it hard
to believe it has much use in the wild now and that headers don't get
split like this in reality, it would probably only be useful on really
old unixes.. The values are the same in our configuration anyway.

Drop the value and just use includedir everywhere.

(From OE-Core rev: 506c91cbc6a604a84e37e53ccff430436369802e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-11-20 15:30:52 +00:00
Peter Kjellerstedt
23f4bb7710 autotools.bbclass: Add *.m4 to CONFIGURE_FILES
This makes do_configure depend on changes to any m4 file when
externalsrc is active.

(From OE-Core rev: 492559191943c9e2666c3dda1824c5aafbe487d5)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-06 11:51:11 +01:00
Richard Purdie
fd1517e2b5 classes: Update classes to match new bitbake class scope functionality
Move classes to classes-global or classes-recipe as appropriate to take
advantage of new bitbake functionality to check class scope/usage.

(From OE-Core rev: f5c128008365e141082c129417eb72d2751e8045)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-12 15:27:17 +01:00