Skip to contentSkip to conversation

core+gcc: align configure commands (branch yem/quickies-for-master)

PATCH New Yann E. MORIN 4 participants 18 messages Nov 22, 2015 – Dec 29, 2015

lore
Share & tools
lore
#0 lore raw

cover core+gcc: align configure commands (branch yem/quickies-for-master)

Hello All!

This series is a cleanup of the configure commands, both in the common autotools infra and in the gcc-final package:

- the host variant of the generic configure command is not indented the same way as the target variant; this is fixed.

- the gcc-final package has to override the default configure command, but the reasons for it were not explained in the code, and the corresponding commit is terse on the explanations; a comment is added.

- the gcc-final custom configure command has diverged quite a bit from the generic one; update it.

Regards,
Yann E. MORIN.

The following changes since commit c9d9bcb4e13651faf1898e9dcfa6d7af707a092b:

package/zmqpp: add patch to fix build issue (2015-11-22 14:26:18 +0100)

are available in the git repository at:

git://git.busybox.net/~ymorin/git/buildroot yem/quickies-for-master

for you to fetch changes up to 4d9f7a6896c496372a4f415987e60eeeac79225b:

package/gcc: align gcc-final configure-cmds to the generic ones (2015-11-22 15:34:53 +0100)

----------------------------------------------------------------
Yann E. MORIN (3):
core/pkg-autotools: align host configure commands to target one package/gcc: comment on why we override the generic configure commands package/gcc: align gcc-final configure-cmds to the generic ones

 package/gcc/gcc-final/gcc-final.mk | 34 +++++++++++++++++++++++++++++-----
 package/pkg-autotools.mk           | 12 ++++++------
 2 files changed, 35 insertions(+), 11 deletions(-)
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#1 lore raw

PATCH 1/3 core/pkg-autotools: align host configure commands to target one

The host configure commands are not indented the same way as the target ones. Besides, there are leading spaces (instead of TABs) on one line.

Replicate the same indentation as used for the target commands.

Cc Thomas Petazzoni <[email protected]>
---
 package/pkg-autotools.mk | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
package/pkg-autotools.mk +6 -6
index 4787914..502eeea 100644
@@ -214,12 +214,12 @@ else
 # installed.
 define $(2)_CONFIGURE_CMDS
 	(cd $$($$(PKG)_SRCDIR) && rm -rf config.cache; \
-	        $$(HOST_CONFIGURE_OPTS) \
-		CFLAGS="$$(HOST_CFLAGS)" \
-		LDFLAGS="$$(HOST_LDFLAGS)" \
-		$$($$(PKG)_CONF_ENV) \
-		CONFIG_SITE=/dev/null \
-		./configure \
+	$$(HOST_CONFIGURE_OPTS) \
+	CFLAGS="$$(HOST_CFLAGS)" \
+	LDFLAGS="$$(HOST_LDFLAGS)" \
+	$$($$(PKG)_CONF_ENV) \
+	CONFIG_SITE=/dev/null \
+	./configure \
 		--prefix="$$(HOST_DIR)/usr" \
 		--sysconfdir="$$(HOST_DIR)/etc" \
 		--localstatedir="$$(HOST_DIR)/var" \
Signature · 1 line
1.9.1
#2 lore raw

PATCH 1/3 core/pkg-autotools: align host configure commands to target one

Quoted 7 lines · Yann E. MORIN

The host configure commands are not indented the same way as the target ones. Besides, there are leading spaces (instead of TABs) on one line.

Replicate the same indentation as used for the target commands.

Cc Thomas Petazzoni <[email protected]>
[Verified that it's whitespace only change.]

Regards,
Arnout

Quoted 28 lines
---
 package/pkg-autotools.mk | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
package/pkg-autotools.mk +6 -6
index 4787914..502eeea 100644
@@ -214,12 +214,12 @@ else
 # installed.
 define $(2)_CONFIGURE_CMDS
 	(cd $$($$(PKG)_SRCDIR) && rm -rf config.cache; \
-	        $$(HOST_CONFIGURE_OPTS) \
-		CFLAGS="$$(HOST_CFLAGS)" \
-		LDFLAGS="$$(HOST_LDFLAGS)" \
-		$$($$(PKG)_CONF_ENV) \
-		CONFIG_SITE=/dev/null \
-		./configure \
+	$$(HOST_CONFIGURE_OPTS) \
+	CFLAGS="$$(HOST_CFLAGS)" \
+	LDFLAGS="$$(HOST_LDFLAGS)" \
+	$$($$(PKG)_CONF_ENV) \
+	CONFIG_SITE=/dev/null \
+	./configure \
 		--prefix="$$(HOST_DIR)/usr" \
 		--sysconfdir="$$(HOST_DIR)/etc" \
 		--localstatedir="$$(HOST_DIR)/var" \
Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
#3 lore raw

PATCH 1/3 core/pkg-autotools: align host configure commands to target one

In reply to Yann E. MORIN

Dear Yann E. MORIN,

Quoted 10 lines · Yann E. MORIN

The host configure commands are not indented the same way as the target ones. Besides, there are leading spaces (instead of TABs) on one line.

Replicate the same indentation as used for the target commands.

Cc Thomas Petazzoni <[email protected]>
---
 package/pkg-autotools.mk | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

Applied to next, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#4 lore raw

PATCH 1/3 core/pkg-autotools: align host configure commands to target one

Thomas, All,

On 2015-11-23 18:38 +0100, Thomas Petazzoni spake thusly:

Quoted 6 lines · Yann E. MORIN
Quoted 5 lines

The host configure commands are not indented the same way as the target ones. Besides, there are leading spaces (instead of TABs) on one line.

Replicate the same indentation as used for the target commands.

Quoted 7 lines
Quoted 5 lines
Cc Thomas Petazzoni <[email protected]>
---
 package/pkg-autotools.mk | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

Applied to next, thanks.

In the cover-letter, I suggestd this be applied to master. Did you overlook that part, or did you apply to next on-purpose? Ditto the second patch.

Thanks! :-)

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#5 lore raw

PATCH 1/3 core/pkg-autotools: align host configure commands to target one

Thomas, All,

On 2015-11-23 18:51 +0100, Yann E. MORIN spake thusly:

Quoted 13 lines

On 2015-11-23 18:38 +0100, Thomas Petazzoni spake thusly:

Quoted 12 lines · Yann E. MORIN
Quoted 10 lines

The host configure commands are not indented the same way as the target ones. Besides, there are leading spaces (instead of TABs) on one line.

Replicate the same indentation as used for the target commands.

Cc Thomas Petazzoni <[email protected]>
---
 package/pkg-autotools.mk | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
Quoted 3 lines
Quoted 1 line

Applied to next, thanks.

In the cover-letter, I suggestd this be applied to master.

No, I did not. It was just the name of the branch. Sigh...

Sorry for the noise...

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#6 lore raw

PATCH 1/3 core/pkg-autotools: align host configure commands to target one

In reply to Yann E. MORIN

Yann,

Quoted 8 lines · Yann E. MORIN
Quoted 4 lines
Quoted 2 lines
 package/pkg-autotools.mk | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

Applied to next, thanks.

In the cover-letter, I suggestd this be applied to master. Did you overlook that part, or did you apply to next on-purpose? Ditto the second patch.

What would the reasoning to apply such patches on master? They don't fix any problem or bug, so they have no reason to be applied on master. They are good for consistency and documentation, but this is clearly not enough to justify being merged for master IMO.

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#7 lore raw

PATCH 1/3 core/pkg-autotools: align host configure commands to target one

Thomas, All,

On 2015-11-23 21:09 +0100, Thomas Petazzoni spake thusly:

Quoted 6 lines · Yann E. MORIN
Quoted 5 lines
Quoted 4 lines
Quoted 2 lines
 package/pkg-autotools.mk | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

Applied to next, thanks.

Quoted 8 lines
Quoted 3 lines

In the cover-letter, I suggestd this be applied to master. Did you overlook that part, or did you apply to next on-purpose? Ditto the second patch.

What would the reasoning to apply such patches on master? They don't fix any problem or bug, so they have no reason to be applied on master. They are good for consistency and documentation, but this is clearly not enough to justify being merged for master IMO.

No problem for them in next. Thanks! :-)

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#8 lore raw

PATCH 2/3 package/gcc: comment on why we override the generic configure commands

In reply to Yann E. MORIN

The explanations given in the commit log of 7d6c79 (Compile static versions of gcc libraries) do not explain why we have to provide custom configure commands, instead of just adding --enable-static to the configure options.

Add a comment in the code that explains why that is so. Add a pointer to the ML archives with the explanations, too.

Cc Thomas Petazzoni <[email protected]>
Cc J?r?me Pouiller <[email protected]>
---
 package/gcc/gcc-final/gcc-final.mk | 9 +++++++++
 1 file changed, 9 insertions(+)
package/gcc/gcc-final/gcc-final.mk +9 -0
index 7802855..dbdb615 100644
@@ -27,6 +27,15 @@ HOST_GCC_FINAL_SUBDIR = build
 
 HOST_GCC_FINAL_PRE_CONFIGURE_HOOKS += HOST_GCC_CONFIGURE_SYMLINK
 
+# We want to always build the static variants of all the gcc libraries,
+# of which libstdc++, libgomp, libmudflap...
+# To do so, we can not just pass --enable-static to override the generic
+# --disable-static flag, otherwise gcc fails to build some of those
+# libraries, see;
+#   http://lists.busybox.net/pipermail/buildroot/2013-October/080412.html
+#
+# So we must completely override the generic commands and provide our own.
+#
 define  HOST_GCC_FINAL_CONFIGURE_CMDS
 	(cd $(HOST_GCC_FINAL_SRCDIR) && rm -rf config.cache; \
 		$(HOST_CONFIGURE_OPTS) \
Signature · 1 line
1.9.1
#9 lore raw

PATCH 2/3 package/gcc: comment on why we override the generic configure commands

Quoted 11 lines · On Sunday 22 November 2015 15:39:42 Yann E. MORIN wrote:

The explanations given in the commit log of 7d6c79 (Compile static versions of gcc libraries) do not explain why we have to provide custom configure commands, instead of just adding --enable-static to the configure options.

Add a comment in the code that explains why that is so. Add a pointer to the ML archives with the explanations, too.

Cc Thomas Petazzoni <[email protected]>
Cc J?r?me Pouiller <[email protected]>
Signature · 3 lines
J?r?me Pouiller, Sysmic
Embedded Linux specialist
http://www.sysmic.fr
#10 lore raw

PATCH 2/3 package/gcc: comment on why we override the generic configure commands

In reply to Yann E. MORIN
Quoted 11 lines · Yann E. MORIN

The explanations given in the commit log of 7d6c79 (Compile static versions of gcc libraries) do not explain why we have to provide custom configure commands, instead of just adding --enable-static to the configure options.

Add a comment in the code that explains why that is so. Add a pointer to the ML archives with the explanations, too.

Cc Thomas Petazzoni <[email protected]>
Cc J?r?me Pouiller <[email protected]>

Regards,
Arnout

Quoted 25 lines
---
 package/gcc/gcc-final/gcc-final.mk | 9 +++++++++
 1 file changed, 9 insertions(+)
package/gcc/gcc-final/gcc-final.mk +9 -0
index 7802855..dbdb615 100644
@@ -27,6 +27,15 @@ HOST_GCC_FINAL_SUBDIR = build
 
 HOST_GCC_FINAL_PRE_CONFIGURE_HOOKS += HOST_GCC_CONFIGURE_SYMLINK
 
+# We want to always build the static variants of all the gcc libraries,
+# of which libstdc++, libgomp, libmudflap...
+# To do so, we can not just pass --enable-static to override the generic
+# --disable-static flag, otherwise gcc fails to build some of those
+# libraries, see;
+#   http://lists.busybox.net/pipermail/buildroot/2013-October/080412.html
+#
+# So we must completely override the generic commands and provide our own.
+#
 define  HOST_GCC_FINAL_CONFIGURE_CMDS
 	(cd $(HOST_GCC_FINAL_SRCDIR) && rm -rf config.cache; \
 		$(HOST_CONFIGURE_OPTS) \
Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
#11 lore raw

PATCH 2/3 package/gcc: comment on why we override the generic configure commands

In reply to Yann E. MORIN

Dear Yann E. MORIN,

Quoted 8 lines · Yann E. MORIN

The explanations given in the commit log of 7d6c79 (Compile static versions of gcc libraries) do not explain why we have to provide custom configure commands, instead of just adding --enable-static to the configure options.

Add a comment in the code that explains why that is so. Add a pointer to the ML archives with the explanations, too.

Quoted 6 lines
Cc Thomas Petazzoni <[email protected]>
Cc J?r?me Pouiller <[email protected]>
---
 package/gcc/gcc-final/gcc-final.mk | 9 +++++++++
 1 file changed, 9 insertions(+)

Applied to next, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#12 lore raw

PATCH 3/3 package/gcc: align gcc-final configure-cmds to the generic ones

In reply to Yann E. MORIN

Since 7d6c79 (Compile static versions of gcc libraries) was applied, the generic configure commands have been updated, but those changes have not been propagated to the gcc-final custom configure commands.

Update the gcc-final custom configure commands to better match the generic ones.

We do not propagate --disable-dependency-tracking because it breaks the build, and --enable-shared (because of 169141a).

Cc Thomas Petazzoni <[email protected]>
---
 package/gcc/gcc-final/gcc-final.mk | 25 ++++++++++++++++++++-----
 1 file changed, 20 insertions(+), 5 deletions(-)
package/gcc/gcc-final/gcc-final.mk +20 -5
index dbdb615..53199c3 100644
@@ -36,16 +36,31 @@ HOST_GCC_FINAL_PRE_CONFIGURE_HOOKS += HOST_GCC_CONFIGURE_SYMLINK
 #
 # So we must completely override the generic commands and provide our own.
 #
+# Except for --disable-dependency-tracking which breaks the build, and
+# --enable-shared (see 169141a, gcc-final: disable shared build for
+# static), we reproduce the exact same command as the autotools infra
+# uses.
+#
 define  HOST_GCC_FINAL_CONFIGURE_CMDS
 	(cd $(HOST_GCC_FINAL_SRCDIR) && rm -rf config.cache; \
-		$(HOST_CONFIGURE_OPTS) \
-		CFLAGS="$(HOST_CFLAGS)" \
-		LDFLAGS="$(HOST_LDFLAGS)" \
-		$(HOST_GCC_FINAL_CONF_ENV) \
-		./configure \
+	$(HOST_CONFIGURE_OPTS) \
+	CFLAGS="$(HOST_CFLAGS)" \
+	LDFLAGS="$(HOST_LDFLAGS)" \
+	$(HOST_GCC_FINAL_CONF_ENV) \
+	CONFIG_SITE=/dev/null \
+	./configure \
 		--prefix="$(HOST_DIR)/usr" \
 		--sysconfdir="$(HOST_DIR)/etc" \
+		--localstatedir="$(HOST_DIR)/var" \
 		--enable-static \
+		--disable-gtk-doc \
+		--disable-gtk-doc-html \
+		--disable-doc \
+		--disable-docs \
+		--disable-documentation \
+		--disable-debug \
+		--with-xmlto=no \
+		--with-fop=no \
 		$(QUIET) $(HOST_GCC_FINAL_CONF_OPTS) \
 	)
 endef
Signature · 1 line
1.9.1
#13 lore raw

PATCH 3/3 package/gcc: align gcc-final configure-cmds to the generic ones

Quoted 30 lines · Yann E. MORIN

Since 7d6c79 (Compile static versions of gcc libraries) was applied, the generic configure commands have been updated, but those changes have not been propagated to the gcc-final custom configure commands.

Update the gcc-final custom configure commands to better match the generic ones.

We do not propagate --disable-dependency-tracking because it breaks the build, and --enable-shared (because of 169141a).

Cc Thomas Petazzoni <[email protected]>
---
 package/gcc/gcc-final/gcc-final.mk | 25 ++++++++++++++++++++-----
 1 file changed, 20 insertions(+), 5 deletions(-)
package/gcc/gcc-final/gcc-final.mk +5 -0
index dbdb615..53199c3 100644
@@ -36,16 +36,31 @@ HOST_GCC_FINAL_PRE_CONFIGURE_HOOKS += HOST_GCC_CONFIGURE_SYMLINK
 #
 # So we must completely override the generic commands and provide our own.
 #
+# Except for --disable-dependency-tracking which breaks the build, and
+# --enable-shared (see 169141a, gcc-final: disable shared build for
+# static), we reproduce the exact same command as the autotools infra
+# uses.
+#
 define  HOST_GCC_FINAL_CONFIGURE_CMDS

package/gcc/gcc-final/gcc-final.mk HOST_GCC_FINAL_PRE_CONFIGURE_HOOKS += HOST_GCC_CONFIGURE_SYMLINK · line 49

Quoted 10 lines
package/gcc/gcc-final/gcc-final.mk +4 -5
 	(cd $(HOST_GCC_FINAL_SRCDIR) && rm -rf config.cache; \
-		$(HOST_CONFIGURE_OPTS) \
-		CFLAGS="$(HOST_CFLAGS)" \
-		LDFLAGS="$(HOST_LDFLAGS)" \
-		$(HOST_GCC_FINAL_CONF_ENV) \
-		./configure \
+	$(HOST_CONFIGURE_OPTS) \
+	CFLAGS="$(HOST_CFLAGS)" \
+	LDFLAGS="$(HOST_LDFLAGS)" \
+	$(HOST_GCC_FINAL_CONF_ENV) \

I do agree with the whitespace change.

package/gcc/gcc-final/gcc-final.mk HOST_GCC_FINAL_PRE_CONFIGURE_HOOKS += HOST_GCC_CONFIGURE_SYMLINK · line 50

Quoted 1 line
package/gcc/gcc-final/gcc-final.mk +1 -0
+	CONFIG_SITE=/dev/null \

This makes sense to me as well.

package/gcc/gcc-final/gcc-final.mk HOST_GCC_FINAL_PRE_CONFIGURE_HOOKS += HOST_GCC_CONFIGURE_SYMLINK · line 54

Quoted 4 lines
package/gcc/gcc-final/gcc-final.mk +2 -0
+	./configure \
 		--prefix="$(HOST_DIR)/usr" \
 		--sysconfdir="$(HOST_DIR)/etc" \
+		--localstatedir="$(HOST_DIR)/var" \

This one is pointless but harmless.

package/gcc/gcc-final/gcc-final.mk HOST_GCC_FINAL_PRE_CONFIGURE_HOOKS += HOST_GCC_CONFIGURE_SYMLINK · line 63

Quoted 9 lines
package/gcc/gcc-final/gcc-final.mk +8 -0
 		--enable-static \
+		--disable-gtk-doc \
+		--disable-gtk-doc-html \
+		--disable-doc \
+		--disable-docs \
+		--disable-documentation \
+		--disable-debug \
+		--with-xmlto=no \
+		--with-fop=no \

But all of this gains us nothing IMHO, and is in a way harmful because it will
produce warnings. We accept those warnings for the generic configure commands because it gives us the advantage of avoiding that we forget to add them when creating a package, but in this case I really don't see the point.

Regards,
Arnout

Quoted 4 lines
package/gcc/gcc-final/gcc-final.mk +0 -0
 		$(QUIET) $(HOST_GCC_FINAL_CONF_OPTS) \
 	)
 endef
Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
#14 lore raw

PATCH 3/3 package/gcc: align gcc-final configure-cmds to the generic ones

Arnout, All,

On 2015-11-22 21:59 +0100, Arnout Vandecappelle spake thusly:

Quoted 55 lines · Yann E. MORIN
Quoted 30 lines

Since 7d6c79 (Compile static versions of gcc libraries) was applied, the generic configure commands have been updated, but those changes have not been propagated to the gcc-final custom configure commands.

Update the gcc-final custom configure commands to better match the generic ones.

We do not propagate --disable-dependency-tracking because it breaks the build, and --enable-shared (because of 169141a).

Cc Thomas Petazzoni <[email protected]>
---
 package/gcc/gcc-final/gcc-final.mk | 25 ++++++++++++++++++++-----
 1 file changed, 20 insertions(+), 5 deletions(-)
package/gcc/gcc-final/gcc-final.mk +5 -0
index dbdb615..53199c3 100644
@@ -36,16 +36,31 @@ HOST_GCC_FINAL_PRE_CONFIGURE_HOOKS += HOST_GCC_CONFIGURE_SYMLINK
 #
 # So we must completely override the generic commands and provide our own.
 #
+# Except for --disable-dependency-tracking which breaks the build, and
+# --enable-shared (see 169141a, gcc-final: disable shared build for
+# static), we reproduce the exact same command as the autotools infra
+# uses.
+#
 define  HOST_GCC_FINAL_CONFIGURE_CMDS

package/gcc/gcc-final/gcc-final.mk HOST_GCC_FINAL_PRE_CONFIGURE_HOOKS += HOST_GCC_CONFIGURE_SYMLINK · line 49

Quoted 10 lines
package/gcc/gcc-final/gcc-final.mk +4 -5
 	(cd $(HOST_GCC_FINAL_SRCDIR) && rm -rf config.cache; \
-		$(HOST_CONFIGURE_OPTS) \
-		CFLAGS="$(HOST_CFLAGS)" \
-		LDFLAGS="$(HOST_LDFLAGS)" \
-		$(HOST_GCC_FINAL_CONF_ENV) \
-		./configure \
+	$(HOST_CONFIGURE_OPTS) \
+	CFLAGS="$(HOST_CFLAGS)" \
+	LDFLAGS="$(HOST_LDFLAGS)" \
+	$(HOST_GCC_FINAL_CONF_ENV) \

I do agree with the whitespace change.

package/gcc/gcc-final/gcc-final.mk HOST_GCC_FINAL_PRE_CONFIGURE_HOOKS += HOST_GCC_CONFIGURE_SYMLINK · line 50

Quoted 1 line
package/gcc/gcc-final/gcc-final.mk +1 -0
+	CONFIG_SITE=/dev/null \

This makes sense to me as well.

package/gcc/gcc-final/gcc-final.mk HOST_GCC_FINAL_PRE_CONFIGURE_HOOKS += HOST_GCC_CONFIGURE_SYMLINK · line 54

Quoted 4 lines
package/gcc/gcc-final/gcc-final.mk +2 -0
+	./configure \
 		--prefix="$(HOST_DIR)/usr" \
 		--sysconfdir="$(HOST_DIR)/etc" \
+		--localstatedir="$(HOST_DIR)/var" \

This one is pointless but harmless.

Quoted 14 lines

package/gcc/gcc-final/gcc-final.mk HOST_GCC_FINAL_PRE_CONFIGURE_HOOKS += HOST_GCC_CONFIGURE_SYMLINK · line 63

Quoted 9 lines
package/gcc/gcc-final/gcc-final.mk +8 -0
 		--enable-static \
+		--disable-gtk-doc \
+		--disable-gtk-doc-html \
+		--disable-doc \
+		--disable-docs \
+		--disable-documentation \
+		--disable-debug \
+		--with-xmlto=no \
+		--with-fop=no \

But all of this gains us nothing IMHO, and is in a way harmful because it will
produce warnings. We accept those warnings for the generic configure commands because it gives us the advantage of avoiding that we forget to add them when creating a package, but in this case I really don't see the point.

The point is to diverge as little as possible from the generic command.

Even if some options are useless, or cause the same warning as if we were using the generic command, they are replicated here. Only those options we really do not want are omitted.

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#15 lore raw

PATCH 3/3 package/gcc: align gcc-final configure-cmds to the generic ones

In reply to Yann E. MORIN

Yann,

Quoted 4 lines · Yann E. MORIN

Since 7d6c79 (Compile static versions of gcc libraries) was applied, the generic configure commands have been updated, but those changes have not been propagated to the gcc-final custom configure commands.

Quoted 8 lines

Update the gcc-final custom configure commands to better match the generic ones.

We do not propagate --disable-dependency-tracking because it breaks the build, and --enable-shared (because of 169141a).

Cc Thomas Petazzoni <[email protected]>

A little bit like Arnout, I am not sure to see the value of fully aligning the configure commands just for the sake of it.

Another possibility is to add a mechanism in the infra to exclude some generic config options from being used. But I tend to hate package infrastructure that are needed only for one package, especially when there is a way of not changing the infrastructure (which is the case here).

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#16 lore raw

PATCH 3/3 package/gcc: align gcc-final configure-cmds to the generic ones

Thomas, All,

On 2015-11-23 21:14 +0100, Thomas Petazzoni spake thusly:

Quoted 8 lines · Yann E. MORIN
Quoted 7 lines

Since 7d6c79 (Compile static versions of gcc libraries) was applied, the generic configure commands have been updated, but those changes have not been propagated to the gcc-final custom configure commands.

Update the gcc-final custom configure commands to better match the generic ones.

Quoted 8 lines
Quoted 5 lines

We do not propagate --disable-dependency-tracking because it breaks the build, and --enable-shared (because of 169141a).

Cc Thomas Petazzoni <[email protected]>

A little bit like Arnout, I am not sure to see the value of fully aligning the configure commands just for the sake of it.

My reasoning is that, when we update the ./configure command in the infra, it's always for a good reason. The current set of options is the result of many successive fixes to so many build failures and corner cases, that we applied over time, and that we know ensure a proper build, hopefully in even the harshest conditions.

It seems logical that we propagate those options to all packages that have to override the ./configure command (unless said options actually prevent the package from building, obviously). For gcc, we already know that the additional options (except the omitted ones) are not causing problems when building gcc-initial, at least (and I actually tested that they did not cause build failures in gcc-final either, on: arm, mips, i386 and xtensa).

That way, when we update the command in the infra, we can easily propagate it down to overriding packages.

Quoted 5 lines

Another possibility is to add a mechanism in the infra to exclude some generic config options from being used. But I tend to hate package infrastructure that are needed only for one package, especially when there is a way of not changing the infrastructure (which is the case here).

Let's see how many autotools packages do redefine their ./configure command:

    $ git grep -l -E 'eval \$\((host-)?autotools-package' |wc -l
    1055

So, we have roughly 1055 (minus the manual) packages using the autotools (or the host-autotools) infra.

    $ grep CONFIGURE_CMDS $(git grep -l -E 'eval \$\((host-)?autotools-package') |wc -l
    10

So, we have 8 (one hit is in the manual, one in a comment) packages that override their ./configure command, with the associated reason:

- berkeleydb: does not support in-tree build

- fbv: does not support cross-compilation

- ffmpeg: does not support --target and such

- gcc-final: needs --enable-static and not --enable-shared, does not support in-tree build, misses options from the infra

- glibc: does not support in-tree build, needs bash to execute
./configure, needs -O2 in CFLAGS, touches two files after the ./configure, uses extra options and misses some from the infra

- libgtk3: host variant redefines all of the configure, build and
install commands, to build just the strictly required stuff

- libplayer: does not support --target and --host

- mdadm: does nothing!

So, it seems we could go with some cleanup there (any taker?):

- fbv, ffmpeg, libplayer, mdadm:
are not autotools packages, should be switched to the generic package infrastructure

- libgtk3: host variant should be switched to the generic package
infrastructure

We'd be left with just three packages, berkeleydb, gcc-final and glibc. The common symptom for all three in the inability to build in-tree. Wecould probably ad dsupport for this in the gneeric infra, but it does not make sense to work on the infra just for those three cases, when you have a series do it so unconditionally, and for all the infras.

So, only gcc-final needs to ditch one option. It does not make sense to add support in the infra just for this case.

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#17 lore raw

PATCH 3/3 package/gcc: align gcc-final configure-cmds to the generic ones

In reply to Yann E. MORIN

Me, All,

On 2015-11-22 15:39 +0100, Yann E. MORIN spake thusly:

Quoted 4 lines

Since 7d6c79 (Compile static versions of gcc libraries) was applied, the generic configure commands have been updated, but those changes have not been propagated to the gcc-final custom configure commands.

Quoted 8 lines

Update the gcc-final custom configure commands to better match the generic ones.

We do not propagate --disable-dependency-tracking because it breaks the build, and --enable-shared (because of 169141a).

Cc Thomas Petazzoni <[email protected]>

Rejected. ;-p

Regards,
Yann E. MORIN.

Quoted 48 lines
---
 package/gcc/gcc-final/gcc-final.mk | 25 ++++++++++++++++++++-----
 1 file changed, 20 insertions(+), 5 deletions(-)
package/gcc/gcc-final/gcc-final.mk +20 -5
index dbdb615..53199c3 100644
@@ -36,16 +36,31 @@ HOST_GCC_FINAL_PRE_CONFIGURE_HOOKS += HOST_GCC_CONFIGURE_SYMLINK
 #
 # So we must completely override the generic commands and provide our own.
 #
+# Except for --disable-dependency-tracking which breaks the build, and
+# --enable-shared (see 169141a, gcc-final: disable shared build for
+# static), we reproduce the exact same command as the autotools infra
+# uses.
+#
 define  HOST_GCC_FINAL_CONFIGURE_CMDS
 	(cd $(HOST_GCC_FINAL_SRCDIR) && rm -rf config.cache; \
-		$(HOST_CONFIGURE_OPTS) \
-		CFLAGS="$(HOST_CFLAGS)" \
-		LDFLAGS="$(HOST_LDFLAGS)" \
-		$(HOST_GCC_FINAL_CONF_ENV) \
-		./configure \
+	$(HOST_CONFIGURE_OPTS) \
+	CFLAGS="$(HOST_CFLAGS)" \
+	LDFLAGS="$(HOST_LDFLAGS)" \
+	$(HOST_GCC_FINAL_CONF_ENV) \
+	CONFIG_SITE=/dev/null \
+	./configure \
 		--prefix="$(HOST_DIR)/usr" \
 		--sysconfdir="$(HOST_DIR)/etc" \
+		--localstatedir="$(HOST_DIR)/var" \
 		--enable-static \
+		--disable-gtk-doc \
+		--disable-gtk-doc-html \
+		--disable-doc \
+		--disable-docs \
+		--disable-documentation \
+		--disable-debug \
+		--with-xmlto=no \
+		--with-fop=no \
 		$(QUIET) $(HOST_GCC_FINAL_CONF_OPTS) \
 	)
 endef
Signature · 1 line
1.9.1
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'