Skip to contentSkip to conversation

lsof: don't use host toolchain to determine target libc

PATCH New Baruch Siach 3 participants 3 messages May 14, 2014 – May 15, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 lsof: don't use host toolchain to determine target libc

The lsof Configure script builds a test program using the host toolchain to test whether glibc is used. This test is broken in cross compilation environment. Set LINUX_CLIB to avoid the test. This should give the correct result even for non glibc toolchains, since all libc variants we support have the netinet/tcp.h header.

Fixes:
http://autobuild.buildroot.net/results/a1f/a1f0572dbf968c21f70b35cefff7ef7a1d9a348a/

Cc Beno?t Th?baudeau <[email protected]>
---
 package/lsof/lsof.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
package/lsof/lsof.mk +2 -1
index f4b1b4cb8f86..332d1f83a5df 100644
@@ -49,7 +49,8 @@ endef
 define LSOF_CONFIGURE_CMDS
 	(cd $(@D) ; \
 		echo n | $(TARGET_CONFIGURE_OPTS) DEBUG="$(TARGET_CFLAGS) $(BR2_LSOF_CFLAGS)" \
-		LSOF_INCLUDE="$(STAGING_DIR)/usr/include" LSOF_CFLAGS_OVERRIDE=1 ./Configure linux)
+		LSOF_INCLUDE="$(STAGING_DIR)/usr/include" LSOF_CFLAGS_OVERRIDE=1 \
+		LINUX_CLIB=-DGLIBCV=2 ./Configure linux)
 	$(LSOF_CONFIGURE_WCHAR_FIXUPS)
 	$(LSOF_CONFIGURE_LOCALE_FIXUPS)
 endef
Signature · 1 line
2.0.0.rc0
#1 lore raw

PATCH 1/1 lsof: don't use host toolchain to determine target libc

Baruch, All,

On 2014-05-14 15:45 +0300, Baruch Siach spake thusly:

Quoted 11 lines

The lsof Configure script builds a test program using the host toolchain to test whether glibc is used. This test is broken in cross compilation environment. Set LINUX_CLIB to avoid the test. This should give the correct result even for non glibc toolchains, since all libc variants we support have the netinet/tcp.h header.

Fixes:
http://autobuild.buildroot.net/results/a1f/a1f0572dbf968c21f70b35cefff7ef7a1d9a348a/

Cc Beno?t Th?baudeau <[email protected]>

Regards,
Yann E. MORIN.

Quoted 25 lines
---
 package/lsof/lsof.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
package/lsof/lsof.mk +2 -1
index f4b1b4cb8f86..332d1f83a5df 100644
@@ -49,7 +49,8 @@ endef
 define LSOF_CONFIGURE_CMDS
 	(cd $(@D) ; \
 		echo n | $(TARGET_CONFIGURE_OPTS) DEBUG="$(TARGET_CFLAGS) $(BR2_LSOF_CFLAGS)" \
-		LSOF_INCLUDE="$(STAGING_DIR)/usr/include" LSOF_CFLAGS_OVERRIDE=1 ./Configure linux)
+		LSOF_INCLUDE="$(STAGING_DIR)/usr/include" LSOF_CFLAGS_OVERRIDE=1 \
+		LINUX_CLIB=-DGLIBCV=2 ./Configure linux)
 	$(LSOF_CONFIGURE_WCHAR_FIXUPS)
 	$(LSOF_CONFIGURE_LOCALE_FIXUPS)
 endef
Signature · 6 lines
2.0.0.rc0

_______________________________________________
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 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#2 lore raw

PATCH 1/1 lsof: don't use host toolchain to determine target libc

In reply to Baruch Siach
Quoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Baruch" == Baruch Siach <[email protected]> writes:

The lsof Configure script builds a test program using the host toolchain to test whether glibc is used. This test is broken in cross compilation environment. Set LINUX_CLIB to avoid the test. This should give the correct result even for non glibc toolchains, since all libc variants we support have the netinet/tcp.h header.

Quoted 5 lines

Fixes:
http://autobuild.buildroot.net/results/a1f/a1f0572dbf968c21f70b35cefff7ef7a1d9a348a/

Cc Beno?t Th?baudeau <[email protected]>

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard