Commit Graph

108 Commits

Author SHA1 Message Date
Quentin Boswank
3a00605494 Check for bash version 4 or higher
We use bash 4 features in some scripts

Signed-off-by: Quentin Boswank <qubos@outlook.de>
2024-03-08 09:56:12 +13:00
Chris Packham
6d46c9e2c5 Remove configure time check for rsync
Now that we're checking for rsync in Kconfig we can remove the check
from ./configure.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
2023-12-18 16:28:14 +13:00
Chris Packham
e63c40854c provide a workaround for a glibc and GNU make incompatibility
Versions of GNU make newer than 4.4 trigger a hang in versions of glibc
older than 2.31. As distros update to the newer GNU make version we'll
start seeing more and more reports of this hang. Fortunately we already
carry GNU make as a comp tool so all we need to do is select the right
version when needed.

Fixes #1946, #1932, #1975
Signed-off-by: Chris Packham <judge.packham@gmail.com>
2023-07-21 16:47:34 +12:00
Thomas Petazzoni
bedec42b53 Revert "Update requirements: autoconf==2.71 and automake>=1.16"
This reverts commit 658f5e574f, which
was made without any justification, and prevents using crosstool-ng
even in decently recent distributions like Ubuntu 20.04 (which has
autoconf 2.69).

We have tested that ./bootstrap && ./configure --enable-local works
fine on Ubuntu 18.04, which uses autoconf 2.69 and automake 1.15, so
the existing requirements were enough.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2023-07-21 16:46:59 +12:00
Bryan Hundven
fa05153eba Make checking for python more predictable.
Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
2023-03-16 16:54:05 +13:00
Bryan Hundven
52e2879584 Switch AC_PROG_YACC to AX_PROG_BISON
AC_PROG_YACC is kinda buggy. Switch to AX_PROG_BISON from
autoconf-archive.

Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
2022-10-27 21:28:42 +13:00
Bryan Hundven
658f5e574f Update requirements: autoconf==2.71 and automake>=1.16
Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
2022-10-27 21:28:42 +13:00
Chris Packham
29b6e00368 binutils: Add binutils 2.39
https://sourceware.org/pipermail/binutils/2022-August/122246.html

Add binutils 2.39 and regenerate patches.
0008-binutils-2.38-vs.-ppc32-linux-kernel.patch is dropped as it has
been applied upstream. Add a milestone for 2.39 which will be handy for
Loongarch.

Binutils now requires bison >= 3.0.4 to build gprofng for x86/aarch64 so
we build our own bison when the host bison does not meet that
requirement (which appears to be the case on macOS).

Signed-off-by: Chris Packham <judge.packham@gmail.com>
2022-08-14 10:15:17 +12:00
Chris Packham
7feb97f137 configure.ac: AC_PROG_LEX set to noyywrap
It appears that noyywrap is actually what is needed for kconfig.
Particularly on arclinux where the default flex installation does not
provide the yywrap function.

Fixes #1790
Fixes 015d039e ("AC_PROG_LEX set to yywrap")

Signed-off-by: Chris Packham <judge.packham@gmail.com>
2022-07-27 20:18:14 +12:00
Bryan Hundven
2691866af1 Bump autoconf requirement to 2.69
This will help with moving forward with newer 2.70 compatibility.

Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
2022-06-27 12:30:02 -07:00
Bryan Hundven
7942a5403f M4 quote yywrap in AC_PROG_LEX
It didn't output an error, but it's best practice.

Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
2022-06-27 12:29:24 -07:00
Bryan Hundven
b30acd3625 Remove obsolete AC_HEADER_STDC
As described in detail here: https://www.gnu.org/software/autoconf/manual/autoconf-2.70/html_node/Particular-Headers.html#index-AC_005fHEADER_005fSTDC-1

We no longer need AC_HEADER_STDC in configure.ac

Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
2022-06-26 18:50:11 -07:00
Bryan Hundven
015d039e5f AC_PROG_LEX set to yywrap
With autoconf 2.70 and newer, you need to define either `yywrap`
or `noyywrap` as an option to AC_PROG_LEX.

https://www.gnu.org/software/autoconf/manual/autoconf-2.71/html_node/Particular-Programs.html#index-AC_005fPROG_005fLEX-1

`yywrap` is needed for kconfig.

Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
2022-06-26 18:44:56 -07:00
Chris Packham
a3e3d734a7 configure.ac: bison is required for kconf
Make the requirement for bison harder (but not strict). The system bison
will be used to build kconf. If the system bison is not GNU bison 2.7 or
later crosstool-ng will build GNU bison as a companion tool if necessary
(for glibc 2.29 or newer).

Fixes #1621
Signed-off-by: Chris Packham <judge.packham@gmail.com>
2022-06-13 20:52:43 +12:00
Chris Packham
ade8c04d14 configure.ac: Check that patch supports --no-backup-if-mismatch
BSD patch does not support --no-backup-if-mismatch. When we detect patch
check that it supports the option we use.

Fixes: #1577

Signed-off-by: Chris Packham <judge.packham@gmail.com>
2022-01-10 13:33:53 +13:00
Chris Packham
f441a6bf0d linux: Add dependency on rsync for Linux >= 5.3
As of Linux v5.3 rsync is used as part of the build process. Add Linux
5.3 as a milestone, configure detection of rsync and a dependency on
rsync for Linux 5.3 and newer. Add a comment in so that users can tell
why they can't select a newer version.

Fixes #1628

Signed-off-by: Chris Packham <judge.packham@gmail.com>
2021-11-30 19:56:44 +13:00
Chris Packham
805fb9e1e0 configure.ac: Silence make output when building ct-ng
Set AM_SILENT_RULES([yes]) to reduce the verbosity from make by default.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
2021-02-01 19:58:19 +13:00
Keith Packard
c15de32ec6 Add picolibc support [v2]
This adds support for using picolibc instead of newlib on embedded
systems.

Signed-off-by: Keith Packard <keithp@keithp.com>

v2:
	Add check for meson and ninja
	Sync option default values with current picolibc defaults
	Remove xtensa sys header file install as those aren't in picolibc
2020-09-01 09:42:53 -07:00
Joachim Nilsson
eaedada797 Allow GNU gettext v0.19.7, which is in Ubuntu 16.04 LTS
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-05-21 13:25:48 +02:00
Alexey Neyman
4ddad7b34f CentOS6 cannot use newer GDB releases
... unless one retrofits it with a decent compiler instead of stock
GCC 4.4.

While here, sync up the ax_*.m4 with autoconf-archive.

Signed-off-by: Alexey Neyman <stilor@att.net>
2019-03-05 00:48:31 -08:00
Alexey Neyman
b3cce054ef Meet our new companion tool, bison
Which is here courtesy of CentOS6, which only has bison 2.4 - while new
glibc requires 2.7.

Signed-off-by: Alexey Neyman <stilor@att.net>
2019-03-04 00:22:02 -08:00
Alexey Neyman
862c35457d Fix build of glibc 2.29 on systems with obsolete host programs
- Force building make as a companion tool if host make is older than
4.0 (CentOS 7 currently has 3.82)
- Disable 2.29 as a choice if host python is older than 3.4
(CentOS 7 has 2.6 unless python from EPEL is installed)
- Python2 emits its version information to STDERR. Ugh.

While there, also use the detected host Python for GDB configuration.

Signed-off-by: Alexey Neyman <stilor@att.net>
2019-03-02 15:45:37 -08:00
Alexey Neyman
9b9e5c4162 Make lzip an optional dependency
Signed-off-by: Alexey Neyman <stilor@att.net>
2019-02-28 17:13:12 -08:00
Alexey Neyman
1a3b562c75 Check for lzip (some archives are lzipped)
Ideally, we should just skip the archives for which we don't have the
utilities; let's leave it until I convert the "trivial checks" part of
crosstool-NG.sh into a separate configure script.

Signed-off-by: Alexey Neyman <stilor@att.net>
2019-02-13 14:45:07 -08:00
Stephan Conrad
b0151f5eb5 added the version 5 to the check of bash versions
Signed-off-by: Stephan Conrad <stephan@conrad.pics>
2019-01-15 16:28:16 +01:00
Alexey Neyman
a4dc14dba4 Consider it success if DoForceRmdir removes only the content
Fixes #929.

Signed-off-by: Alexey Neyman <stilor@att.net>
2018-12-01 14:44:08 -08:00
Alexey Neyman
da76ae3ea3 Add DTC as a companion tool
(needed for cross-gdb targeting the moxie-* targets)

Signed-off-by: Alexey Neyman <stilor@att.net>
2018-11-28 00:30:10 -08:00
Alexey Neyman
2a749b6923 Still need to check for libtool presence
... as kconfig depends on it.

Signed-off-by: Alexey Neyman <stilor@att.net>
2018-11-09 16:30:44 -08:00
Roman Bolshakov
0229bc415e Add an override for bison
glibc build requires GNU bison >= 2.7 but Apple ships bison 2.3. If we
provide an override for GNU bison it should be possible to use a version
from homebrew.

Signed-off-by: Roman Bolshakov <r.bolshakov@yadro.com>
2018-11-07 20:42:16 +03:00
Anton Maklakov
77b8e827b7 Add a "which" dependency into the configure script 2018-11-05 15:20:15 +08:00
Alexey Neyman
e738751e83 Accept any libtool version
ct-ng will build its own version if a recent enough version is not
detected.

Signed-off-by: Alexey Neyman <stilor@att.net>
2018-10-27 14:19:27 -07:00
Alexey Neyman
675c392d1a Check for file presence (missing in default CentOS7)
Signed-off-by: Alexey Neyman <stilor@att.net>
2018-10-22 14:44:53 -07:00
Alexey Neyman
d14adeb1d9 Use git-version-gen to generate version info
Suggested-by: Chris Packham <judge.packham@gmail.com>
Signed-off-by: Alexey Neyman <stilor@att.net>
2018-06-06 17:52:17 -07:00
Alexey Neyman
74979fb19b Add checking for *sum and unzip
Also improve logging (add an ability to log commands/files/environment variables
to config.log)

Signed-off-by: Alexey Neyman <stilor@att.net>
2018-04-29 12:06:54 -07:00
Anton Maklakov
7efb493d37 Add compatibility with automake < 1.14
As we support CentOS, for example, we have a problem there

    automake: warnings are treated as errors
    kconfig/Makefile.am:26: warning: compiling 'lxdialog/checklist.c' in subdir requires 'AM_PROG_CC_C_O' in
    'configure.ac'
    autoreconf: automake failed with exit status: 1
2018-04-27 15:26:06 +08:00
Alexey Neyman
0d7822e796 Require libtool be present
Signed-off-by: Alexey Neyman <stilor@att.net>
2018-04-15 14:29:37 -07:00
Alexey Neyman
7eb903667b Lintian warnings cleanup
Signed-off-by: Alexey Neyman <stilor@att.net>
2018-04-07 12:03:17 -07:00
Alexey Neyman
b670aaf1ad Install bash completion into new location
/share/bash-completion/completions rather than /etc/bash_completion.d

Signed-off-by: Alexey Neyman <stilor@att.net>
2018-04-07 12:03:17 -07:00
Alexey Neyman
970811a1c5 Conditionally install bash completion
Signed-off-by: Alexey Neyman <stilor@att.net>
2018-04-07 12:03:17 -07:00
Alexey Neyman
bb6c97551f User manual installation
... when running from a release tarball.

Signed-off-by: Alexey Neyman <stilor@att.net>
2018-04-07 12:03:17 -07:00
Alexey Neyman
355f6f03fb Cannot ignore 'make install' with automake
Automake does not allow us to place the hooks before its generated actions,
and does not allow us to check MAKECMDGOALS, and does not support a mechanism
for disabling make install (such as noinst_SUBDIRS, requested a few times
on automake mailing list). The only way I could preserve the current behavior
is to have a GNUmakefile wrapper that will convert MAKECMDGOAL into a variable
unknown to automake - which seems too convoluted a solution for the problem
being solved.

Hence the approach is to not override anything for --enable-local. It is now
fully handled by selecting different values for CT_xxx_DIR in ct-ng.in; but
at the build-system level, all the variables remain the same. We just don't
support 'make install' in that case anymore; but the ct-ng in the working
copy can be used after a regular 'make' (or 'make all').

Help message for --enable-local updated accordingly.

Signed-off-by: Alexey Neyman <stilor@att.net>
2018-04-07 12:03:17 -07:00
Alexey Neyman
f45e29c5ca Restore --enable-local use
Signed-off-by: Alexey Neyman <stilor@att.net>
2018-04-07 12:03:17 -07:00
Alexey Neyman
5b95b81ea9 Kill gperf vestiges
Generate paths.sh by configure, do away with paths.mk.

Signed-off-by: Alexey Neyman <stilor@att.net>
2018-04-07 12:03:17 -07:00
Alexey Neyman
9dc94f3662 Install "pure data" directories
... and update .gitignore. Survives 'make distcheck'.

Signed-off-by: Alexey Neyman <stilor@att.net>
2018-04-07 12:03:17 -07:00
Alexey Neyman
d9d4d09026 Enable mconf build
Signed-off-by: Alexey Neyman <stilor@att.net>
2018-04-07 12:03:17 -07:00
Alexey Neyman
66821508f4 Fix install --strip-program check after merge
Also, fix the use of AC_CACHE_CHECK in stat format checker.

Signed-off-by: Alexey Neyman <stilor@att.net>
2018-04-07 12:03:17 -07:00
Alexey Neyman
7655fc2a3c Cleanup after rebase on master:
gperf detection macros no longer needed, gperf is not used anymore.

Signed-off-by: Alexey Neyman <stilor@att.net>
2018-04-07 12:03:17 -07:00
Alexey Neyman
9238b58721 WIP: autotoolization
Signed-off-by: Alexey Neyman <stilor@att.net>
2018-04-07 12:03:17 -07:00
Alexey Neyman
576dcc3fee Remove special handling of dpkg-buildflags
Instead, just honor CFLAGS/CPPFLAGS/LDFLAGS as they're passed down from
configure. This brings the build process in compliance with the
recommended practices.

Signed-off-by: Alexey Neyman <stilor@att.net>
2018-04-07 12:02:33 -07:00
Alexey Neyman
d401afbdda Get rid of sub{lib,doc}dir
They don't make sense - using same ct-ng won't work with different versions,
so they cannot coexist in the same prefix.

Also localize other configure variables so that their usage is easier to track.

Signed-off-by: Alexey Neyman <stilor@att.net>
2018-04-07 12:02:33 -07:00