From: "Martin Liška" <mliska@suse.cz>
To: Andreas Schwab <schwab@linux-m68k.org>
Cc: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>,
gcc-patches@gcc.gnu.org, Joseph Myers <joseph@codesourcery.com>
Subject: Re: [PATCH] configure: add --disable-fix-includes
Date: Wed, 11 May 2022 16:50:54 +0200 [thread overview]
Message-ID: <de68d89e-b998-def6-f92c-f734f2be33e1@suse.cz> (raw)
In-Reply-To: <87pmkkutdz.fsf@igel.home>
[-- Attachment #1: Type: text/plain, Size: 673 bytes --]
On 5/11/22 14:48, Andreas Schwab wrote:
> On Mai 11 2022, Martin Liška wrote:
>
>> @Joseph: Can you please help me why --disable-$foo disables building $foo
>> folder during the build?
>
> # Handle --disable-<component> generically.
> for dir in $configdirs $build_configdirs $target_configdirs ; do
> dirname=`echo $dir | sed -e s/target-//g -e s/build-//g -e s/-/_/g`
> varname=`echo $dirname | sed -e s/+/_/g`
> if eval test x\${enable_${varname}} "=" xno ; then
> noconfigdirs="$noconfigdirs $dir"
> fi
> done
>
Great, thanks!
Using that I provide v3 where I renamed the option to --{enable,disable}-fixincludes.
Ready to be installed?
Thanks,
Martin
[-- Attachment #2: 0001-configure-add-disable-fixincludes.patch --]
[-- Type: text/x-patch, Size: 6800 bytes --]
From 2d3079a14ee26192ebbc81e7c9663ae49ad7a178 Mon Sep 17 00:00:00 2001
From: Martin Liska <mliska@suse.cz>
Date: Fri, 4 Feb 2022 13:42:14 +0100
Subject: [PATCH] configure: add --disable-fixincludes
Right now, fixinclude takes about 11 seconds on my machine, where
it reads 130MB of header files.
The number of fixed headers is negligible without any significant
change.
fixincludes/ChangeLog:
* fixinc.in: Add early exit.
gcc/ChangeLog:
* Makefile.in: Support enable_fixincludes.
* configure.ac: Add --disable-fixincludes.
* configure: Regenerate.
* doc/install.texi: Document the newly added configure options.
ChangeLog:
* configure.ac: Ignore --disable-fixincludes.
* configure: Regenerate.
---
configure | 4 ++++
configure.ac | 4 ++++
fixincludes/fixinc.in | 6 ++++++
gcc/Makefile.in | 6 ++++--
gcc/configure | 16 ++++++++++++++--
gcc/configure.ac | 6 ++++++
gcc/doc/install.texi | 7 +++++++
7 files changed, 45 insertions(+), 4 deletions(-)
diff --git a/configure b/configure
index 5dcaab14ae9..fb3897585b8 100755
--- a/configure
+++ b/configure
@@ -9041,6 +9041,10 @@ fi
for dir in $configdirs $build_configdirs $target_configdirs ; do
dirname=`echo $dir | sed -e s/target-//g -e s/build-//g -e s/-/_/g`
varname=`echo $dirname | sed -e s/+/_/g`
+ # Skip --disable-fixincludes, it is handled in gcc/configure
+ if eval test x${varname} "=" xfixincludes ; then
+ continue
+ fi
if eval test x\${enable_${varname}} "=" xno ; then
noconfigdirs="$noconfigdirs $dir"
fi
diff --git a/configure.ac b/configure.ac
index 85977482aee..a0466533a46 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2305,6 +2305,10 @@ fi
for dir in $configdirs $build_configdirs $target_configdirs ; do
dirname=`echo $dir | sed -e s/target-//g -e s/build-//g -e s/-/_/g`
varname=`echo $dirname | sed -e s/+/_/g`
+ # Skip --disable-fixincludes, it is handled in gcc/configure
+ if eval test x${varname} "=" xfixincludes ; then
+ continue
+ fi
if eval test x\${enable_${varname}} "=" xno ; then
noconfigdirs="$noconfigdirs $dir"
fi
diff --git a/fixincludes/fixinc.in b/fixincludes/fixinc.in
index 0bd8027a554..bc2494c9f3a 100755
--- a/fixincludes/fixinc.in
+++ b/fixincludes/fixinc.in
@@ -63,6 +63,12 @@ else
esac
fi
+if test "x$ENABLE_FIXINCLUDES" = "xno"
+then
+ echo "Skipping fixincludes"
+ exit 0
+fi
+
# Define what target system we're fixing.
#
if test -r ./Makefile; then
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index 31ff95500c9..f73c6a731b3 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -401,6 +401,8 @@ PLUGINLIBS = @pluginlibs@
enable_plugin = @enable_plugin@
+enable_fixincludes = @enable_fixincludes@
+
# On MinGW plugin installation involves installing import libraries.
ifeq ($(enable_plugin),yes)
plugin_implib := $(if $(strip $(filter mingw%,$(host_os))),yes,no)
@@ -3248,8 +3250,8 @@ stmp-fixinc: gsyslimits.h macro_list fixinc_list \
chmod a+rx $${fix_dir} || true; \
(TARGET_MACHINE='$(target)'; srcdir=`cd $(srcdir); ${PWD_COMMAND}`; \
SHELL='$(SHELL)'; MACRO_LIST=`${PWD_COMMAND}`/macro_list ; \
- gcc_dir=`${PWD_COMMAND}` ; \
- export TARGET_MACHINE srcdir SHELL MACRO_LIST && \
+ gcc_dir=`${PWD_COMMAND}` ; ENABLE_FIXINCLUDES=${enable_fixincludes} \
+ export TARGET_MACHINE srcdir SHELL MACRO_LIST ENABLE_FIXINCLUDES && \
cd $(build_objdir)/fixincludes && \
$(SHELL) ./fixinc.sh "$${gcc_dir}/$${fix_dir}" \
$(BUILD_SYSTEM_HEADER_DIR) $(OTHER_FIXINCLUDES_DIRS) ); \
diff --git a/gcc/configure b/gcc/configure
index 5ce0557719a..04affa93864 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -839,6 +839,7 @@ with_float
with_cpu
enable_multiarch
enable_multilib
+enable_fixincludes
coverage_flags
valgrind_command
valgrind_path_defines
@@ -958,6 +959,7 @@ enable_werror_always
enable_checking
enable_coverage
enable_gather_detailed_mem_stats
+enable_fixincludes
enable_valgrind_annotations
enable_multilib
enable_multiarch
@@ -1688,6 +1690,7 @@ Optional Features:
Values are opt, noopt, default is noopt
--enable-gather-detailed-mem-stats
enable detailed memory allocation stats gathering
+ --disable-fixincludes skip fixing of includes
--enable-valgrind-annotations
enable valgrind runtime interaction
--enable-multilib enable library support for multiple ABIs
@@ -7783,6 +7786,15 @@ cat >>confdefs.h <<_ACEOF
_ACEOF
+# Check whether --enable-fixincludes was given.
+if test "${enable_fixincludes+set}" = set; then :
+ enableval=$enable_fixincludes;
+else
+ enable_fixincludes=yes
+fi
+
+
+
# Check whether --enable-valgrind-annotations was given.
if test "${enable_valgrind_annotations+set}" = set; then :
enableval=$enable_valgrind_annotations;
@@ -19673,7 +19685,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 19676 "configure"
+#line 19688 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -19779,7 +19791,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 19782 "configure"
+#line 19794 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
diff --git a/gcc/configure.ac b/gcc/configure.ac
index 23bee7010a3..80300f3caaf 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -842,6 +842,12 @@ gather_stats=`if test $enable_gather_detailed_mem_stats != no; then echo 1; else
AC_DEFINE_UNQUOTED(GATHER_STATISTICS, $gather_stats,
[Define to enable detailed memory allocation stats gathering.])
+AC_ARG_ENABLE(fixincludes,
+[AS_HELP_STRING([--disable-fixincludes],
+ [skip fixing of includes])], [],
+[enable_fixincludes=yes])
+AC_SUBST(enable_fixincludes)
+
AC_ARG_ENABLE(valgrind-annotations,
[AS_HELP_STRING([--enable-valgrind-annotations],
[enable valgrind runtime interaction])], [],
diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi
index 10bfceffceb..1d055bb190d 100644
--- a/gcc/doc/install.texi
+++ b/gcc/doc/install.texi
@@ -2371,6 +2371,13 @@ For a native build and cross compiles that have target headers, the option's
default is derived from glibc's behavior. When glibc clamps float_t to double,
GCC follows and enables the option. For other cross compiles, the default is
disabled.
+
+@item --enable-fixincludes
+@itemx --disable-fixincludes
+
+Enable fixing of system header files. GCC needs to install corrected versions
+of some system header files. This is because most target systems have
+some header files that won’t work with GCC unless they are changed.
@end table
@subheading Cross-Compiler-Specific Options
--
2.36.1
next prev parent reply other threads:[~2022-05-11 14:50 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-09 9:03 Martin Liška
2022-05-09 9:31 ` Andreas Schwab
2022-05-09 21:14 ` Joseph Myers
2022-05-11 10:55 ` Martin Liška
2022-05-11 11:00 ` Rainer Orth
2022-05-11 11:15 ` Martin Liška
2022-05-11 11:31 ` Rainer Orth
2022-05-11 11:58 ` Martin Liška
2022-05-11 12:48 ` Andreas Schwab
2022-05-11 14:50 ` Martin Liška [this message]
2022-05-20 12:42 ` Alexandre Oliva
2022-05-24 12:05 ` [PATCH v2] Support --disable-fixincludes Martin Liška
2022-05-25 5:37 ` Alexandre Oliva
2022-07-08 11:14 ` Martin Liška
2022-07-09 16:11 ` Jeff Law
2022-08-31 4:30 ` Xi Ruoyao
2022-08-31 4:30 ` Xi Ruoyao
2022-08-31 15:25 ` Alexandre Oliva
-- strict thread matches above, loose matches on Subject: below --
2022-02-04 12:52 [PATCH] configure: add --disable-fix-includes Martin Liška
2022-02-04 13:07 ` Rainer Orth
2022-02-04 13:25 ` Richard Biener
2022-02-04 13:30 ` Jakub Jelinek
2022-02-04 15:01 ` Martin Liška
2022-02-04 15:22 ` Martin Liška
2022-02-05 2:26 ` Allan McRae
2022-02-28 8:36 ` Martin Liška
2022-02-04 15:02 ` Martin Liška
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=de68d89e-b998-def6-f92c-f734f2be33e1@suse.cz \
--to=mliska@suse.cz \
--cc=gcc-patches@gcc.gnu.org \
--cc=joseph@codesourcery.com \
--cc=ro@CeBiTec.Uni-Bielefeld.DE \
--cc=schwab@linux-m68k.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).