Skip to contentSkip to conversation

svn commit: trunk/buildroot/package/libgcrypt

Buildroot aldot at uclibc.org 2 participants 2 messages Sep 19, 2007

lore
Share & tools
lore
#0 lore raw

Author: aldot
Date: 2007-09-19 05:20:52 -0700 (Wed, 19 Sep 2007) New Revision: 19888

Log:
- fix incorrect setting of $ac_cv_sys_symbol_underscore.
There is no reason not to AC_COMPILE and use the set cross-nm to look for the symbol mangling scheme. Thus it is incorrect to check for cross compilation in the GNUPG_SYS_SYMBOL_UNDERSCORE check.
- fix bug when configuring (has to wipe config.cache !)

Added:
trunk/buildroot/package/libgcrypt/libgcrypt-00-ac_cv_sys_symbol_underscore.patch trunk/buildroot/package/libgcrypt/libgcrypt-01-reconfigure.patch

Modified:
trunk/buildroot/package/libgcrypt/libgcrypt.mk

Changeset:
Added: trunk/buildroot/package/libgcrypt/libgcrypt-00-ac_cv_sys_symbol_underscore.patch
===================================================================

buildroot/package/libgcrypt/libgcrypt-00-ac_cv_sys_symbol_underscore.patch +24 -0
@@ -0,0 +1,24 @@
+diff -u libgcrypt-1.2.4.oorig/acinclude.m4 libgcrypt-1.2.4/acinclude.m4
+--- libgcrypt-1.2.4.oorig/acinclude.m4	2005-07-29 15:45:48.000000000 +0200
++++ libgcrypt-1.2.4/acinclude.m4	2007-09-19 13:33:19.000000000 +0200
+@@ -99,12 +99,14 @@
+     i386-emx-os2 | i[3456]86-pc-os2*emx | i386-pc-msdosdjgpp)
+         ac_cv_sys_symbol_underscore=yes
+         ;;
+-    *)
+-      if test "$cross_compiling" = yes; then
+-         ac_cv_sys_symbol_underscore=yes
+-      else
+-         tmp_do_check="yes"
+-      fi
++    *) if test -z "$ac_cv_sys_symbol_underscore"; then
++         if test "$cross_compiling" = yes && 
++         then
++           ac_cv_sys_symbol_underscore=yes
++         else
++           tmp_do_check="yes"
++         fi
++        fi
+        ;;
+ esac
+ if test "$tmp_do_check" = "yes"; then

Added: trunk/buildroot/package/libgcrypt/libgcrypt-01-reconfigure.patch
===================================================================

buildroot/package/libgcrypt/libgcrypt-01-reconfigure.patch +17 -0
@@ -0,0 +1,17 @@
+--- libgcrypt-1.2.4.oorig/configure	2007-09-19 13:40:48.000000000 +0200
++++ libgcrypt-1.2.4/configure	2007-09-19 13:41:44.000000000 +0200
+@@ -27370,12 +27370,13 @@
+     i386-emx-os2 | i345686-pc-os2*emx | i386-pc-msdosdjgpp)
+         ac_cv_sys_symbol_underscore=yes
+         ;;
+-    *)
++    *)if test -z "$ac_cv_sys_symbol_underscore";then
+       if test "$cross_compiling" = yes; then
+          ac_cv_sys_symbol_underscore=yes
+       else
+          tmp_do_check="yes"
+       fi
++      fi
+        ;;
+ esac
+ if test "$tmp_do_check" = "yes"; then

Modified: trunk/buildroot/package/libgcrypt/libgcrypt.mk
===================================================================

buildroot/package/libgcrypt/libgcrypt.mk +5 -2
@@ -18,12 +18,16 @@
 	$(BZCAT) $(DL_DIR)/$(LIBGCRYPT_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
 	toolchain/patch-kernel.sh $(LIBGCRYPT_DIR) package/libgcrypt/ libgcrypt\*.patch
 	$(CONFIG_UPDATE) $(LIBGCRYPT_DIR)
+	# This is incorrectly hardwired to yes for cross-compiles with no
+	# sane way to pass pre-existing knowledge so fix it with the chainsaw..
+	$(SED) '/GNUPG_SYS_SYMBOL_UNDERSCORE/d' $(LIBGCRYPT_DIR)/configure
 	touch $@
 
 $(LIBGCRYPT_DIR)/.configured: $(LIBGCRYPT_DIR)/.source
-	(cd $(LIBGCRYPT_DIR); \
+	(cd $(LIBGCRYPT_DIR); rm -f config.cache; \
 		$(TARGET_CONFIGURE_OPTS) \
 		$(TARGET_CONFIGURE_ARGS) \
+		ac_cv_sys_symbol_underscore=no \
 		./configure \
 		--target=$(GNU_TARGET_NAME) \
 		--host=$(GNU_TARGET_NAME) \
@@ -41,7 +45,6 @@
 		--mandir=/usr/man \
 		--infodir=/usr/info \
 		--disable-optimization \
-		--with-capabilities \
 	)
 	touch $@
 
#1 lore raw
Quoted 10 lines · aldot at uclibc.org

Author: aldot
Date: 2007-09-19 05:20:52 -0700 (Wed, 19 Sep 2007) New Revision: 19888

Log:
- fix incorrect setting of $ac_cv_sys_symbol_underscore.
There is no reason not to AC_COMPILE and use the set cross-nm to look for the symbol mangling scheme. Thus it is incorrect to check for cross compilation in the GNUPG_SYS_SYMBOL_UNDERSCORE check.
- fix bug when configuring (has to wipe config.cache !)

Ulf,

I'm curious how that did ever work for you?

I assume that if all was setup correctly, you would have ended up with:
../src/.libs/libgcrypt.so -lnsl
../src/.libs/libgcrypt.so: undefined reference to _gcry_mpih_addmul_1' ../src/.libs/libgcrypt.so: undefined reference to _gcry_mpih_rshift' ../src/.libs/libgcrypt.so: undefined reference to _gcry_mpih_add_n' ../src/.libs/libgcrypt.so: undefined reference to _gcry_mpih_mul_1' ../src/.libs/libgcrypt.so: undefined reference to _gcry_mpih_submul_1' ../src/.libs/libgcrypt.so: undefined reference to _gcry_mpih_lshift' ../src/.libs/libgcrypt.so: undefined reference to `_gcry_mpih_sub_n'

Same for vpnc that didn't even have libgcrypt as prerequisite, but that doesn't matter much anyway since gcrypt was completely broken anyway.

Please audit your packages, as said in my previous mail..