Skip to content

Commit

Permalink
tools/autoconf: bump to 2.71
Browse files Browse the repository at this point in the history
Autoconf release 2.71 is a bugfix release of 2.70
Links provided are the changelog of 2.70 [1] [2]
and the announcement of 2.71 [3]

The first patch needed to be rewritten.
Some of the lines in the patch were moved
to be consistent with the same change added upstream
in other similar files.

Second and third patches are no longer needed,
Emacs can now be disabled at the configure stage,
and support for musl was added upstream.

The patch now causes help2man to be required
for installing man pages, but we don't need them.
There is no way to disable man pages build
with the configure script,
so use make to touch the files with the build target install-man1.

Link: https://lists.gnu.org/archive/html/autotools-announce/2020-12/msg00001.html
Link: https://lwn.net/Articles/839395
Link: https://lists.gnu.org/archive/html/info-gnu/2021-01/msg00017.html
Signed-off-by: Michael Pratt <mcpratt@pm.me>
  • Loading branch information
mpratt14 authored and hauke committed Mar 13, 2023
1 parent b377623 commit 030447b
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 128 deletions.
6 changes: 4 additions & 2 deletions tools/autoconf/Makefile
Expand Up @@ -7,18 +7,20 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=autoconf
PKG_VERSION:=2.69
PKG_VERSION:=2.71

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@GNU/autoconf
PKG_HASH:=64ebcec9f8ac5b2487125a86a7760d2591ac9e1d3dbd59489633f9de62a57684
PKG_HASH:=f14c83cfebcc9427f2c3cea7258bd90df972d92eb26752da4ddad81c87a0faa4

include $(INCLUDE_DIR)/host-build.mk

HOST_CONFIGURE_VARS += \
EMACS="no" \
PERL="/usr/bin/env perl"

define Host/Compile
-$(call Host/Compile/Default,--touch install-man1) # disable building of man pages
$(call Host/Compile/Default)
endef

Expand Down
123 changes: 43 additions & 80 deletions tools/autoconf/patches/000-relocatable.patch
@@ -1,7 +1,11 @@
--- a/bin/autoheader.in
+++ b/bin/autoheader.in
@@ -28,7 +28,8 @@ eval 'case $# in 0) exec @PERL@ -S "$0";
@@ -30,9 +30,12 @@ use 5.006;
use strict;
use warnings FATAL => 'all';

+$^W = 1;
+
BEGIN
{
- my $pkgdatadir = $ENV{'autom4te_perllibdir'} || '@pkgdatadir@';
Expand All @@ -10,33 +14,23 @@
unshift @INC, "$pkgdatadir";

# Override SHELL. On DJGPP SHELL may not be set to a shell
@@ -50,7 +51,7 @@ use strict;
use vars qw ($config_h %verbatim %symbol);
@@ -54,7 +57,7 @@ use Autom4te::XFile;
our ($config_h, %symbol, %verbatim);

# Lib files.
-my $autom4te = $ENV{'AUTOM4TE'} || '@bindir@/@autom4te-name@';
+my $autom4te = $ENV{'AUTOM4TE'} || ($ENV{'STAGING_DIR_HOST'} ? $ENV{'STAGING_DIR_HOST'} . '/bin/@autom4te-name@' : '@bindir@/@autom4te-name@');
local $config_h;
my $config_h_in;
my @prepend_include;
my @include;
--- a/bin/autom4te.in
+++ b/bin/autom4te.in
@@ -1,10 +1,12 @@
-#! @PERL@ -w
+#! @PERL@
# -*- perl -*-
# @configure_input@

eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac'
if 0;
@@ -26,9 +26,12 @@ use 5.006;
use strict;
use warnings FATAL => 'all';

+$^W = 1;
+
# autom4te - Wrapper around M4 libraries.
# Copyright (C) 2001-2003, 2005-2012 Free Software Foundation, Inc.

@@ -24,7 +26,8 @@ eval 'case $# in 0) exec @PERL@ -S "$0";

BEGIN
{
- my $pkgdatadir = $ENV{'autom4te_perllibdir'} || '@pkgdatadir@';
Expand All @@ -45,8 +39,8 @@
unshift @INC, $pkgdatadir;

# Override SHELL. On DJGPP SHELL may not be set to a shell
@@ -44,7 +47,8 @@ use File::Basename;
use strict;
@@ -48,7 +51,8 @@ use Autom4te::General;
use Autom4te::XFile;

# Data directory.
-my $pkgdatadir = $ENV{'AC_MACRODIR'} || '@pkgdatadir@';
Expand All @@ -55,7 +49,7 @@

# $LANGUAGE{LANGUAGE} -- Automatic options for LANGUAGE.
my %language;
@@ -87,7 +91,7 @@ my @include;
@@ -91,7 +95,7 @@ my @include;
my $freeze = 0;

# $M4.
Expand All @@ -64,7 +58,7 @@
# Some non-GNU m4's don't reject the --help option, so give them /dev/null.
fatal "need GNU m4 1.4 or later: $m4"
if system "$m4 --help </dev/null 2>&1 | grep reload-state >/dev/null";
@@ -269,6 +273,12 @@ sub load_configuration ($)
@@ -272,6 +276,12 @@ sub load_configuration ($)

my @words = shellwords ($_);
my $type = shift @words;
Expand All @@ -79,54 +73,39 @@
fatal "$file:$.: end-language missing for: $lang"
--- a/bin/autoreconf.in
+++ b/bin/autoreconf.in
@@ -1,10 +1,12 @@
-#! @PERL@ -w
+#! @PERL@
# -*- perl -*-
# @configure_input@

eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac'
if 0;
@@ -29,10 +29,13 @@ use 5.006;
use strict;
use warnings FATAL => 'all';

+$^W = 1;
+
# autoreconf - install the GNU Build System in a directory tree
# Copyright (C) 1994, 1999-2012 Free Software Foundation, Inc.

@@ -26,7 +28,8 @@ eval 'case $# in 0) exec @PERL@ -S "$0";

my $buildauxdir;
BEGIN
{
- my $pkgdatadir = $ENV{'autom4te_perllibdir'} || '@pkgdatadir@';
+ my $pkgdatadir = $ENV{'autom4te_perllibdir'} ||
+ ($ENV{'STAGING_DIR_HOST'} ? $ENV{'STAGING_DIR_HOST'} . '/share/autoconf' : '@pkgdatadir@');
unshift @INC, $pkgdatadir;

# Override SHELL. On DJGPP SHELL may not be set to a shell
@@ -106,9 +109,9 @@ Written by David J. MacKenzie and Akim D
$buildauxdir = $ENV{'autom4te_buildauxdir'} || $pkgdatadir . '/build-aux';
@@ -117,9 +120,9 @@ Written by David J. MacKenzie and Akim D
";

# Lib files.
-my $autoconf = $ENV{'AUTOCONF'} || '@bindir@/@autoconf-name@';
-my $autoheader = $ENV{'AUTOHEADER'} || '@bindir@/@autoheader-name@';
-my $autom4te = $ENV{'AUTOM4TE'} || '@bindir@/@autom4te-name@';
+my $autoconf = $ENV{'AUTOCONF'} || ($ENV{'STAGING_DIR_HOST'} ? $ENV{'STAGING_DIR_HOST'} . '/bin/@autoconf-name@' : '@bindir@/@autoconf-name@');
+my $autoheader = $ENV{'AUTOHEADER'} || ($ENV{'STAGING_DIR_HOST'} ? $ENV{'STAGING_DIR_HOST'} . '/bin/@autoheader-name@' : '@bindir@/@autoheader-name@');
+my $autom4te = $ENV{'AUTOM4TE'} || ($ENV{'STAGING_DIR_HOST'} ? $ENV{'STAGING_DIR_HOST'} . '/bin/@autom4te-name@' : '@bindir@/@autom4te-name@');
my $automake = $ENV{'AUTOMAKE'} || 'automake';
my $aclocal = $ENV{'ACLOCAL'} || 'aclocal';
my $libtoolize = $ENV{'LIBTOOLIZE'} || 'libtoolize';
-my $autoconf = $ENV{'AUTOCONF'} || '@bindir@/@autoconf-name@';
-my $autoheader = $ENV{'AUTOHEADER'} || '@bindir@/@autoheader-name@';
-my $autom4te = $ENV{'AUTOM4TE'} || '@bindir@/@autom4te-name@';
+my $autoconf = $ENV{'AUTOCONF'} || ($ENV{'STAGING_DIR_HOST'} ? $ENV{'STAGING_DIR_HOST'} . '/bin/@autoconf-name@' : '@bindir@/@autoconf-name@');
+my $autoheader = $ENV{'AUTOHEADER'} || ($ENV{'STAGING_DIR_HOST'} ? $ENV{'STAGING_DIR_HOST'} . '/bin/@autoheader-name@' : '@bindir@/@autoheader-name@');
+my $autom4te = $ENV{'AUTOM4TE'} || ($ENV{'STAGING_DIR_HOST'} ? $ENV{'STAGING_DIR_HOST'} . '/bin/@autom4te-name@' : '@bindir@/@autom4te-name@');
my $automake = $ENV{'AUTOMAKE'} || 'automake';
my $aclocal = $ENV{'ACLOCAL'} || 'aclocal';
my $libtoolize = $ENV{'LIBTOOLIZE'} || 'libtoolize';
--- a/bin/autoscan.in
+++ b/bin/autoscan.in
@@ -1,4 +1,4 @@
-#! @PERL@ -w
+#! @PERL@
# -*- perl -*-
# @configure_input@

@@ -23,9 +23,12 @@
eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac'
if 0;
@@ -28,9 +28,12 @@ use 5.006;
use strict;
use warnings FATAL => 'all';

+$^W = 1;
+
Expand All @@ -138,7 +117,7 @@
unshift @INC, $pkgdatadir;

# Override SHELL. On DJGPP SHELL may not be set to a shell
@@ -91,10 +94,10 @@ my $configure_scan = 'configure.scan';
@@ -95,10 +98,10 @@ my %needed_macros =
my $log;

# Autoconf and lib files.
Expand All @@ -153,15 +132,9 @@
# -----
--- a/bin/autoupdate.in
+++ b/bin/autoupdate.in
@@ -1,4 +1,4 @@
-#! @PERL@ -w
+#! @PERL@
# -*- perl -*-
# @configure_input@

@@ -24,9 +24,12 @@
eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac'
if 0;
@@ -29,9 +29,12 @@ use 5.006;
use strict;
use warnings FATAL => 'all';

+$^W = 1;
+
Expand All @@ -173,7 +146,7 @@
unshift @INC, $pkgdatadir;

# Override SHELL. On DJGPP SHELL may not be set to a shell
@@ -50,10 +53,10 @@ my $autom4te = $ENV{'AUTOM4TE'} || '@bin
@@ -55,10 +58,10 @@ my $autom4te = $ENV{'AUTOM4TE'} || '@bin
my $autoconf = "$autom4te --language=autoconf";
# We need to find m4sugar.
my @prepend_include;
Expand All @@ -188,22 +161,12 @@
# $HELP
--- a/bin/ifnames.in
+++ b/bin/ifnames.in
@@ -1,10 +1,12 @@
-#! @PERL@ -w
+#! @PERL@
# -*- perl -*-
# @configure_input@

eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac'
if 0;
@@ -33,9 +33,12 @@ use 5.006;
use strict;
use warnings FATAL => 'all';

+$^W = 1;
+
# ifnames - print the identifiers used in C preprocessor conditionals

# Copyright (C) 1994-1995, 1999-2003, 2005-2012 Free Software
@@ -31,7 +33,8 @@ eval 'case $# in 0) exec @PERL@ -S "$0";

BEGIN
{
- my $pkgdatadir = $ENV{'autom4te_perllibdir'} || '@pkgdatadir@';
Expand All @@ -214,7 +177,7 @@
# Override SHELL. On DJGPP SHELL may not be set to a shell
--- a/bin/autoconf.as
+++ b/bin/autoconf.as
@@ -84,7 +84,11 @@ exit_missing_arg='
@@ -89,7 +89,11 @@ exit_missing_arg='
# restore font-lock: '

# Variables.
Expand All @@ -224,6 +187,6 @@
+else
+ : ${AUTOM4TE='@bindir@/@autom4te-name@'}
+fi
: ${trailer_m4='@pkgdatadir@/autoconf/trailer.m4'}
autom4te_options=
outfile=
verbose=false
22 changes: 0 additions & 22 deletions tools/autoconf/patches/001-no_emacs_lib.patch

This file was deleted.

24 changes: 0 additions & 24 deletions tools/autoconf/patches/002-musl_host_fixup.patch

This file was deleted.

7 comments on commit 030447b

@schm0
Copy link

@schm0 schm0 commented on 030447b Mar 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

glibc fails to build with this as it requires autoconf 2.69

@peterwillcn
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gnutls fails to build

@hauke
Copy link
Member

@hauke hauke commented on 030447b Mar 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gnutls build was fixed in f08190e

@peterwillcn
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gnutls build was fixed in f08190e

awesome

@ttocsr
Copy link
Contributor

@ttocsr ttocsr commented on 030447b Mar 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was anything done to resolve glibc requiring autoconf 2.69?

@schm0
Copy link

@schm0 schm0 commented on 030447b Mar 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was anything done to resolve glibc requiring autoconf 2.69?

No, but when the build fails, edit:
build_dir/toolchain-*glibc/glibc-2.37/aclocal.m4
Change
m4_define([GLIBC_AUTOCONF_VERSION], [2.69])
to
m4_define([GLIBC_AUTOCONF_VERSION], [2.71])

Then run make again without doing a make clean before.

@ttocsr
Copy link
Contributor

@ttocsr ttocsr commented on 030447b Mar 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I realize that. But even in current master of glibc autoconf is still 2.69.

Please sign in to comment.