Fix building when host and target systems are same arch
authorNicolas Thill <nico@openwrt.org>
Tue, 9 Aug 2005 13:23:17 +0000 (13:23 +0000)
committerNicolas Thill <nico@openwrt.org>
Tue, 9 Aug 2005 13:23:17 +0000 (13:23 +0000)
SVN-Revision: 1584

openwrt/package/ncurses/Makefile
openwrt/package/ncurses/patches/500-cross.patch [new file with mode: 0644]

index 662ea6e89a13f48a7cd06088f7367c9704844334..cdcf9feb6d255db50c17edfe4e1b4de3f2725815 100644 (file)
@@ -71,7 +71,7 @@ $(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.prepared
                $(TARGET_CONFIGURE_OPTS) \
                CFLAGS="$(TARGET_CFLAGS)" \
                CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
-               LDFLAGS="-L$(STAGING_DIR)/usr/lib" \
+               LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
                ac_cv_linux_vers="2" \
                ./configure \
                --target=$(GNU_TARGET_NAME) \
diff --git a/openwrt/package/ncurses/patches/500-cross.patch b/openwrt/package/ncurses/patches/500-cross.patch
new file mode 100644 (file)
index 0000000..9536191
--- /dev/null
@@ -0,0 +1,24 @@
+diff -ruN ncurses-5.2-orig/aclocal.m4 ncurses-5.2-6/aclocal.m4
+--- ncurses-5.2-orig/aclocal.m4        2000-10-21 00:57:49.000000000 +0200
++++ ncurses-5.2-6/aclocal.m4   2005-08-09 14:50:15.000000000 +0200
+@@ -1919,7 +1919,7 @@
+                       EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
+               fi
+               test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
+-              MK_SHARED_LIB='$(CC) -shared -Wl,-soname,`basename $[@] .$(REL_VERSION)`.$(ABI_VERSION),-stats,-lc -o $[@]'
++              MK_SHARED_LIB='$(CC) -shared -Wl,-soname,`basename $[@] .$(REL_VERSION)`.$(ABI_VERSION),-stats,$(LDFLAGS) -lc -o $[@]'
+               ;;
+       openbsd2*)
+               CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
+diff -ruN ncurses-5.2-orig/configure ncurses-5.2-6/configure
+--- ncurses-5.2-orig/configure 2000-10-21 00:58:49.000000000 +0200
++++ ncurses-5.2-6/configure    2005-08-09 14:50:25.000000000 +0200
+@@ -2660,7 +2660,7 @@
+                       EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
+               fi
+               test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
+-              MK_SHARED_LIB='$(CC) -shared -Wl,-soname,`basename $@ .$(REL_VERSION)`.$(ABI_VERSION),-stats,-lc -o $@'
++              MK_SHARED_LIB='$(CC) -shared -Wl,-soname,`basename $@ .$(REL_VERSION)`.$(ABI_VERSION),-stats,$(LDFLAGS) -lc -o $@'
+               ;;
+       openbsd2*)
+               CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"