Skip to contentSkip to conversation

package/libxml-parser-perl: use the compiler as "LD"

PATCH New Thomas Petazzoni 4 participants 4 messages Sep 9, 2020 – Sep 11, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/libxml-parser-perl: use the compiler as "LD"

Since commit efa95b19aeab6bdcd7d5a620e199c2c32cf2516b ("package/libxml-parser-perl: make host build use correct compiler"), we pass $(HOST_CONFIGURE_OPTS) when building host-libxml-parser-perl, in order to use the correct host compiler.

However, this means that LD="$(HOSTLD)" is passed. However, the host-libxml-parser-perl passes compiler arguments to LD, so it really assumes that LD is gcc, not ld. For example, it tries to pass -mtune=generic.

So, let's tell host-libxml-parser-perl that LD is "$(HOSTCC)".

Fixes:

http://autobuild.buildroot.net/results/2ed2e5ccefe9047c597f84d5880de2e8de2bdd94/

---
 package/libxml-parser-perl/libxml-parser-perl.mk | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
package/libxml-parser-perl/libxml-parser-perl.mk +7 -2
index 100c49633c..37cef2e418 100644
@@ -12,9 +12,14 @@ LIBXML_PARSER_PERL_LICENSE = Artistic or GPL-1.0+
 LIBXML_PARSER_PERL_LICENSE_FILES = README
 LIBXML_PARSER_PERL_RUN_PERL = `which perl`
 
+HOST_LIBXML_PARSER_PERL_CONFIGURE_OPTS = \
+	$(HOST_CONFIGURE_OPTS) \
+	LD="$(HOSTCC)"
+
 define HOST_LIBXML_PARSER_PERL_CONFIGURE_CMDS
 	(cd $(@D) ; \
-		$(HOST_CONFIGURE_OPTS) $(LIBXML_PARSER_PERL_RUN_PERL) Makefile.PL \
+		$(HOST_LIBXML_PARSER_PERL_CONFIGURE_OPTS) \
+			$(LIBXML_PARSER_PERL_RUN_PERL) Makefile.PL \
 			PREFIX=$(HOST_DIR) \
 			EXPATLIBPATH=$(HOST_DIR)/lib \
 			EXPATINCPATH=$(HOST_DIR)/include \
@@ -25,7 +30,7 @@ define HOST_LIBXML_PARSER_PERL_CONFIGURE_CMDS
 endef
 
 define HOST_LIBXML_PARSER_PERL_BUILD_CMDS
-	$(HOST_MAKE_ENV) $(MAKE) $(HOST_CONFIGURE_OPTS) -C $(@D)
+	$(HOST_MAKE_ENV) $(MAKE) $(HOST_LIBXML_PARSER_PERL_CONFIGURE_OPTS) -C $(@D)
 endef
 
 define HOST_LIBXML_PARSER_PERL_INSTALL_CMDS
Signature · 1 line
2.26.2
#1 lore raw

PATCH 1/1 package/libxml-parser-perl: use the compiler as "LD"

Hi Thomas,

Quoted 54 lines · Thomas Petazzoni

Since commit efa95b19aeab6bdcd7d5a620e199c2c32cf2516b ("package/libxml-parser-perl: make host build use correct compiler"), we pass $(HOST_CONFIGURE_OPTS) when building host-libxml-parser-perl, in order to use the correct host compiler.

However, this means that LD="$(HOSTLD)" is passed. However, the host-libxml-parser-perl passes compiler arguments to LD, so it really assumes that LD is gcc, not ld. For example, it tries to pass -mtune=generic.

So, let's tell host-libxml-parser-perl that LD is "$(HOSTCC)".

Fixes:

http://autobuild.buildroot.net/results/2ed2e5ccefe9047c597f84d5880de2e8de2bdd94/

---
 package/libxml-parser-perl/libxml-parser-perl.mk | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
package/libxml-parser-perl/libxml-parser-perl.mk +7 -3
index 100c49633c..37cef2e418 100644
@@ -12,9 +12,14 @@ LIBXML_PARSER_PERL_LICENSE = Artistic or GPL-1.0+
 LIBXML_PARSER_PERL_LICENSE_FILES = README
 LIBXML_PARSER_PERL_RUN_PERL = `which perl`
 
+HOST_LIBXML_PARSER_PERL_CONFIGURE_OPTS = \
+       $(HOST_CONFIGURE_OPTS) \
+       LD="$(HOSTCC)"
+
 define HOST_LIBXML_PARSER_PERL_CONFIGURE_CMDS
        (cd $(@D) ; \
-               $(HOST_CONFIGURE_OPTS) $(LIBXML_PARSER_PERL_RUN_PERL) Makefile.PL \
+               $(HOST_LIBXML_PARSER_PERL_CONFIGURE_OPTS) \
+                       $(LIBXML_PARSER_PERL_RUN_PERL) Makefile.PL \
                        PREFIX=$(HOST_DIR) \
                        EXPATLIBPATH=$(HOST_DIR)/lib \
                        EXPATINCPATH=$(HOST_DIR)/include \
@@ -25,7 +30,7 @@ define HOST_LIBXML_PARSER_PERL_CONFIGURE_CMDS
 endef
 
 define HOST_LIBXML_PARSER_PERL_BUILD_CMDS
-       $(HOST_MAKE_ENV) $(MAKE) $(HOST_CONFIGURE_OPTS) -C $(@D)
+       $(HOST_MAKE_ENV) $(MAKE) $(HOST_LIBXML_PARSER_PERL_CONFIGURE_OPTS) -C $(@D)
 endef
 
 define HOST_LIBXML_PARSER_PERL_INSTALL_CMDS
--

2.26.2

Quoted 4 lines

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

Thanks!

#2 lore raw

PATCH 1/1 package/libxml-parser-perl: use the compiler as "LD"

In reply to Thomas Petazzoni

Thomas, All,

On 2020-09-09 23:34 +0200, Thomas Petazzoni spake thusly:

Quoted 10 lines

Since commit efa95b19aeab6bdcd7d5a620e199c2c32cf2516b ("package/libxml-parser-perl: make host build use correct compiler"), we pass $(HOST_CONFIGURE_OPTS) when building host-libxml-parser-perl, in order to use the correct host compiler.

However, this means that LD="$(HOSTLD)" is passed. However, the host-libxml-parser-perl passes compiler arguments to LD, so it really assumes that LD is gcc, not ld. For example, it tries to pass -mtune=generic.

Quoted 7 lines

So, let's tell host-libxml-parser-perl that LD is "$(HOSTCC)".

Fixes:

http://autobuild.buildroot.net/results/2ed2e5ccefe9047c597f84d5880de2e8de2bdd94/

Applied to master, after adding the tested-by tag Joseph gave during our live discussion on IRC... Thanks.

Regards,
Yann E. MORIN.

Quoted 40 lines
---
 package/libxml-parser-perl/libxml-parser-perl.mk | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
package/libxml-parser-perl/libxml-parser-perl.mk +7 -2
index 100c49633c..37cef2e418 100644
@@ -12,9 +12,14 @@ LIBXML_PARSER_PERL_LICENSE = Artistic or GPL-1.0+
 LIBXML_PARSER_PERL_LICENSE_FILES = README
 LIBXML_PARSER_PERL_RUN_PERL = `which perl`
 
+HOST_LIBXML_PARSER_PERL_CONFIGURE_OPTS = \
+	$(HOST_CONFIGURE_OPTS) \
+	LD="$(HOSTCC)"
+
 define HOST_LIBXML_PARSER_PERL_CONFIGURE_CMDS
 	(cd $(@D) ; \
-		$(HOST_CONFIGURE_OPTS) $(LIBXML_PARSER_PERL_RUN_PERL) Makefile.PL \
+		$(HOST_LIBXML_PARSER_PERL_CONFIGURE_OPTS) \
+			$(LIBXML_PARSER_PERL_RUN_PERL) Makefile.PL \
 			PREFIX=$(HOST_DIR) \
 			EXPATLIBPATH=$(HOST_DIR)/lib \
 			EXPATINCPATH=$(HOST_DIR)/include \
@@ -25,7 +30,7 @@ define HOST_LIBXML_PARSER_PERL_CONFIGURE_CMDS
 endef
 
 define HOST_LIBXML_PARSER_PERL_BUILD_CMDS
-	$(HOST_MAKE_ENV) $(MAKE) $(HOST_CONFIGURE_OPTS) -C $(@D)
+	$(HOST_MAKE_ENV) $(MAKE) $(HOST_LIBXML_PARSER_PERL_CONFIGURE_OPTS) -C $(@D)
 endef
 
 define HOST_LIBXML_PARSER_PERL_INSTALL_CMDS
Signature · 6 lines
2.26.2

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#3 lore raw

PATCH 1/1 package/libxml-parser-perl: use the compiler as "LD"

In reply to Thomas Petazzoni
Quoted 12 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas Petazzoni <[email protected]> writes:

Since commit efa95b19aeab6bdcd7d5a620e199c2c32cf2516b ("package/libxml-parser-perl: make host build use correct compiler"), we pass $(HOST_CONFIGURE_OPTS) when building host-libxml-parser-perl, in order to use the correct host compiler.

However, this means that LD="$(HOSTLD)" is passed. However, the host-libxml-parser-perl passes compiler arguments to LD, so it really assumes that LD is gcc, not ld. For example, it tries to pass -mtune=generic.

Quoted 7 lines

So, let's tell host-libxml-parser-perl that LD is "$(HOSTCC)".

Fixes:

http://autobuild.buildroot.net/results/2ed2e5ccefe9047c597f84d5880de2e8de2bdd94/

Committed to 2020.02.x, 2020.05.x and 2020.08.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard