-
Notifications
You must be signed in to change notification settings - Fork 19.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
35cc320
commit 9060452
Showing
10 changed files
with
475 additions
and
328 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,121 +1,84 @@ | ||
--- a/libltdl/config/general.m4sh | ||
+++ b/libltdl/config/general.m4sh | ||
@@ -45,15 +45,22 @@ progpath="$0" | ||
M4SH_VERBATIM([[ | ||
: ${CP="cp -f"} | ||
test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} | ||
-: ${EGREP="@EGREP@"} | ||
-: ${FGREP="@FGREP@"} | ||
-: ${GREP="@GREP@"} | ||
: ${LN_S="@LN_S@"} | ||
: ${MAKE="make"} | ||
: ${MKDIR="mkdir"} | ||
: ${MV="mv -f"} | ||
: ${RM="rm -f"} | ||
-: ${SED="@SED@"} | ||
+if test -n "$STAGING_DIR_HOST"; then | ||
+ : ${EGREP="$STAGING_DIR_HOST/bin/grep -E"} | ||
+ : ${FGREP="$STAGING_DIR_HOST/bin/grep -F"} | ||
+ : ${GREP="$STAGING_DIR_HOST/bin/grep"} | ||
+ : ${SED="$STAGING_DIR_HOST/bin/sed"} | ||
+else | ||
+ : ${EGREP="@EGREP@"} | ||
+ : ${FGREP="@FGREP@"} | ||
+ : ${GREP="@GREP@"} | ||
+ : ${SED="@SED@"} | ||
+fi | ||
: ${SHELL="${CONFIG_SHELL-/bin/sh}"} | ||
: ${Xsed="$SED -e 1s/^X//"} | ||
|
||
From ca10caa502f971f90d8c041aa2476de54ef0ce2b Mon Sep 17 00:00:00 2001 | ||
From: Eneas U de Queiroz <[email protected]> | ||
Date: Tue, 20 Jul 2021 16:41:11 -0300 | ||
Subject: openwrt: make relocatable, search resources relative to STAGING_DIR | ||
|
||
This was originally commited to openwrt by Jo-Philipp Wich | ||
<[email protected]>. | ||
|
||
Signed-off-by: Eneas U de Queiroz <[email protected]> | ||
|
||
--- a/libtoolize.in | ||
+++ b/libtoolize.in | ||
@@ -334,15 +334,22 @@ as_unset=as_fn_unset | ||
@@ -38,14 +38,23 @@ | ||
# with bootstrap, so set those here where they can still be over- | ||
# ridden by the user, but otherwise take precedence. | ||
|
||
: ${CP="cp -f"} | ||
test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} | ||
-: ${AUTOCONF="autoconf"} | ||
-: ${AUTOMAKE="automake"} | ||
-: ${EGREP="@EGREP@"} | ||
-: ${FGREP="@FGREP@"} | ||
-: ${GREP="@GREP@"} | ||
: ${LN_S="@LN_S@"} | ||
: ${MAKE="make"} | ||
: ${MKDIR="mkdir"} | ||
: ${MV="mv -f"} | ||
: ${RM="rm -f"} | ||
-: ${SED="@SED@"} | ||
|
||
+if test -n "$STAGING_DIR_HOST"; then | ||
+ : ${AUTOCONF="$STAGING_DIR_HOST/bin/autoconf"} | ||
+ : ${AUTOMAKE="$STAGING_DIR_HOST/bin/automake"} | ||
+ : ${EGREP="$STAGING_DIR_HOST/bin/grep -E"} | ||
+ : ${FGREP="$STAGING_DIR_HOST/bin/grep -F"} | ||
+ : ${GREP="$STAGING_DIR_HOST/bin/grep"} | ||
+ : ${SED="$STAGING_DIR_HOST/bin/sed"} | ||
+else | ||
+ : ${AUTOCONF="autoconf"} | ||
+ : ${AUTOMAKE="automake"} | ||
+ : ${EGREP="@EGREP@"} | ||
+ : ${FGREP="@FGREP@"} | ||
+ : ${GREP="@GREP@"} | ||
+ : ${SED="@SED@"} | ||
+fi | ||
: ${SHELL="${CONFIG_SHELL-/bin/sh}"} | ||
: ${Xsed="$SED -e 1s/^X//"} | ||
|
||
@@ -2487,10 +2494,17 @@ func_check_macros () | ||
## -------------------------- ## | ||
## Source external libraries. ## | ||
@@ -1901,11 +1910,21 @@ func_require_seen_libtool () | ||
pkgmacro_files="@pkgmacro_files@" | ||
|
||
# Locations for important files: | ||
prefix=@prefix@ | ||
- datadir=@datadir@ | ||
- pkgdatadir=@pkgdatadir@ | ||
- pkgltdldir=@pkgdatadir@ | ||
- aclocaldir=@aclocaldir@ | ||
- prefix="@prefix@" | ||
- datadir="@datadir@" | ||
- pkgauxdir="@pkgauxdir@" | ||
- pkgltdldir="@pkgdatadir@" | ||
- aclocaldir="@aclocaldir@" | ||
+ if test -n "$STAGING_DIR_HOST"; then | ||
+ prefix="$STAGING_DIR_HOST" | ||
+ datadir="$STAGING_DIR_HOST/share" | ||
+ pkgauxdir="$STAGING_DIR_HOST/share/libtool/build-aux" | ||
+ pkgdatadir="$STAGING_DIR_HOST/share/libtool" | ||
+ pkgltdldir="$STAGING_DIR_HOST/share/libtool" | ||
+ aclocaldir="$STAGING_DIR_HOST/share/aclocal" | ||
+ else | ||
+ datadir=@datadir@ | ||
+ pkgdatadir=@pkgdatadir@ | ||
+ pkgltdldir=@pkgdatadir@ | ||
+ aclocaldir=@aclocaldir@ | ||
+ prefix="@prefix@" | ||
+ datadir="@datadir@" | ||
+ pkgauxdir="@pkgauxdir@" | ||
+ pkgdatadir="@pkgdatadir@" | ||
+ pkgltdldir="@pkgdatadir@" | ||
+ aclocaldir="@aclocaldir@" | ||
+ fi | ||
auxdir= | ||
macrodir= | ||
configure_ac=configure.in | ||
--- a/libtoolize.m4sh | ||
+++ b/libtoolize.m4sh | ||
@@ -1453,10 +1453,17 @@ func_check_macros () | ||
|
||
# Locations for important files: | ||
prefix=@prefix@ | ||
- datadir=@datadir@ | ||
- pkgdatadir=@pkgdatadir@ | ||
- pkgltdldir=@pkgdatadir@ | ||
- aclocaldir=@aclocaldir@ | ||
+ if test -n "$STAGING_DIR_HOST"; then | ||
+ datadir="$STAGING_DIR_HOST/share" | ||
+ pkgdatadir="$STAGING_DIR_HOST/share/libtool" | ||
+ pkgltdldir="$STAGING_DIR_HOST/share/libtool" | ||
+ aclocaldir="$STAGING_DIR_HOST/share/aclocal" | ||
+ else | ||
+ datadir=@datadir@ | ||
+ pkgdatadir=@pkgdatadir@ | ||
+ pkgltdldir=@pkgdatadir@ | ||
+ aclocaldir=@aclocaldir@ | ||
+ fi | ||
auxdir= | ||
macrodir= | ||
configure_ac=configure.in | ||
--- a/libltdl/m4/libtool.m4 | ||
+++ b/libltdl/m4/libtool.m4 | ||
@@ -907,9 +907,8 @@ dnl AC_DEFUN([AC_LIBTOOL_RC], []) | ||
# ---------------- | ||
m4_defun([_LT_TAG_COMPILER], | ||
# Allow the user to override the master libtoolize repository: | ||
if test -n "$_lt_pkgdatadir"; then | ||
--- a/m4/libtool.m4 | ||
+++ b/m4/libtool.m4 | ||
@@ -931,7 +931,7 @@ m4_defun([_LT_TAG_COMPILER], | ||
[AC_REQUIRE([AC_PROG_CC])dnl | ||
- | ||
_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl | ||
-_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl | ||
+_LT_DECL([LTCFLAGS], [CFLAGS], ["-O2 -I\${STAGING_DIR_HOST:-$STAGING_DIR_HOST}/include"], [LTCC compiler flags])dnl | ||
_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl | ||
_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl | ||
|
||
@@ -7660,9 +7659,9 @@ m4_defun([_LT_DECL_EGREP], | ||
@@ -8160,9 +8160,9 @@ m4_defun([_LT_DECL_EGREP], | ||
[AC_REQUIRE([AC_PROG_EGREP])dnl | ||
AC_REQUIRE([AC_PROG_FGREP])dnl | ||
test -z "$GREP" && GREP=grep | ||
|
@@ -128,7 +91,7 @@ | |
dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too | ||
AC_SUBST([GREP]) | ||
]) | ||
@@ -7695,9 +7694,8 @@ AC_SUBST([DLLTOOL]) | ||
@@ -8195,9 +8195,8 @@ AC_SUBST([DLLTOOL]) | ||
# as few characters as possible. Prefer GNU sed if found. | ||
m4_defun([_LT_DECL_SED], | ||
[AC_PROG_SED | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,83 +1,55 @@ | ||
--- a/libltdl/config/ltmain.m4sh | ||
+++ b/libltdl/config/ltmain.m4sh | ||
@@ -5731,8 +5731,14 @@ func_mode_link () | ||
absdir="$abs_ladir" | ||
libdir="$abs_ladir" | ||
From 67ffe8e8582a7ba1f1d1307a419098e6dd88bdaf Mon Sep 17 00:00:00 2001 | ||
From: Eneas U de Queiroz <[email protected]> | ||
Date: Tue, 20 Jul 2021 16:41:11 -0300 | ||
Subject: openwrt: cross-compilation path adjustments | ||
|
||
Comments from the patch: | ||
|
||
Adding 'libdir' from the .la file to our library search paths | ||
breaks crosscompilation horribly. We cheat here and don't add | ||
it, instead adding the path where we found the .la. -CL | ||
|
||
OE sets installed=no in staging. We need to look in $objdir and $absdir, | ||
preferring $objdir. RP 31/04/2008 | ||
|
||
This was originally commited to openwrt by Jo-Philipp Wich | ||
<[email protected]>. | ||
|
||
Signed-off-by: Eneas U de Queiroz <[email protected]> | ||
|
||
--- a/build-aux/ltmain.in | ||
+++ b/build-aux/ltmain.in | ||
@@ -6049,8 +6049,14 @@ func_mode_link () | ||
absdir=$abs_ladir | ||
libdir=$abs_ladir | ||
else | ||
- dir="$lt_sysroot$libdir" | ||
- absdir="$lt_sysroot$libdir" | ||
- dir=$lt_sysroot$libdir | ||
- absdir=$lt_sysroot$libdir | ||
+ # Adding 'libdir' from the .la file to our library search paths | ||
+ # breaks crosscompilation horribly. We cheat here and don't add | ||
+ # it, instead adding the path where we found the .la. -CL | ||
+ dir="$lt_sysroot$abs_ladir" | ||
+ absdir="$abs_ladir" | ||
+ libdir="$abs_ladir" | ||
+ #dir="$libdir" | ||
+ #absdir="$lt_sysroot$libdir" | ||
+ #dir=$lt_sysroot$libdir | ||
+ #absdir=$lt_sysroot$libdir | ||
fi | ||
test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes | ||
test yes = "$hardcode_automatic" && avoidtemprpath=yes | ||
else | ||
@@ -6130,8 +6136,6 @@ func_mode_link () | ||
add="$libdir/$linklib" | ||
@@ -6448,8 +6454,6 @@ func_mode_link () | ||
add=$libdir/$linklib | ||
fi | ||
else | ||
- # We cannot seem to hardcode it, guess we'll fake it. | ||
- add_dir="-L$libdir" | ||
- add_dir=-L$libdir | ||
# Try looking first in the location we're being installed to. | ||
if test -n "$inst_prefix_dir"; then | ||
case $libdir in | ||
@@ -6286,7 +6290,17 @@ func_mode_link () | ||
@@ -6604,7 +6608,17 @@ func_mode_link () | ||
fi | ||
;; | ||
*) | ||
- path="-L$absdir/$objdir" | ||
+ # OE sets installed=no in staging. We need to look in $objdir and $absdir, | ||
+ # preferring $objdir. RP 31/04/2008 | ||
+ if test -f "$absdir/$objdir/$depdepl" ; then | ||
+ depdepl="$absdir/$objdir/$depdepl" | ||
+ path="-L$absdir/$objdir" | ||
+ elif test -f "$absdir/$depdepl" ; then | ||
+ depdepl="$absdir/$depdepl" | ||
+ path="-L$absdir" | ||
+ else | ||
+ path="-L$absdir/$objdir" | ||
+ fi | ||
;; | ||
esac | ||
else | ||
--- a/libltdl/config/ltmain.sh | ||
+++ b/libltdl/config/ltmain.sh | ||
@@ -6518,8 +6518,14 @@ func_mode_link () | ||
absdir="$abs_ladir" | ||
libdir="$abs_ladir" | ||
else | ||
- dir="$lt_sysroot$libdir" | ||
- absdir="$lt_sysroot$libdir" | ||
+ # Adding 'libdir' from the .la file to our library search paths | ||
+ # breaks crosscompilation horribly. We cheat here and don't add | ||
+ # it, instead adding the path where we found the .la. -CL | ||
+ dir="$lt_sysroot$abs_ladir" | ||
+ absdir="$abs_ladir" | ||
+ libdir="$abs_ladir" | ||
+ #dir="$libdir" | ||
+ #absdir="$lt_sysroot$libdir" | ||
fi | ||
test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes | ||
else | ||
@@ -6917,8 +6923,6 @@ func_mode_link () | ||
add="$libdir/$linklib" | ||
fi | ||
else | ||
- # We cannot seem to hardcode it, guess we'll fake it. | ||
- add_dir="-L$libdir" | ||
# Try looking first in the location we're being installed to. | ||
if test -n "$inst_prefix_dir"; then | ||
case $libdir in | ||
@@ -7073,7 +7077,17 @@ func_mode_link () | ||
fi | ||
;; | ||
*) | ||
- path="-L$absdir/$objdir" | ||
- path=-L$absdir/$objdir | ||
+ # OE sets installed=no in staging. We need to look in $objdir and $absdir, | ||
+ # preferring $objdir. RP 31/04/2008 | ||
+ if test -f "$absdir/$objdir/$depdepl" ; then | ||
|
50 changes: 31 additions & 19 deletions
50
tools/libtool/patches/110-dont-use-target-dir-for-relinking.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,32 @@ | ||
--- a/libltdl/config/ltmain.m4sh | ||
+++ b/libltdl/config/ltmain.m4sh | ||
@@ -6120,7 +6120,6 @@ func_mode_link () | ||
test "$hardcode_direct_absolute" = no; then | ||
add="$libdir/$linklib" | ||
elif test "$hardcode_minus_L" = yes; then | ||
- add_dir="-L$libdir" | ||
add="-l$name" | ||
elif test "$hardcode_shlibpath_var" = yes; then | ||
case :$finalize_shlibpath: in | ||
--- a/libltdl/config/ltmain.sh | ||
+++ b/libltdl/config/ltmain.sh | ||
@@ -6907,7 +6907,6 @@ func_mode_link () | ||
test "$hardcode_direct_absolute" = no; then | ||
add="$libdir/$linklib" | ||
elif test "$hardcode_minus_L" = yes; then | ||
- add_dir="-L$libdir" | ||
add="-l$name" | ||
elif test "$hardcode_shlibpath_var" = yes; then | ||
From 375833af93999f8b0a747c8a1dfa3ec8d347743d Mon Sep 17 00:00:00 2001 | ||
From: Eneas U de Queiroz <[email protected]> | ||
Date: Tue, 20 Jul 2021 16:52:37 -0300 | ||
Subject: openwrt: don't use target dir for relinking | ||
|
||
This was originally commited to openwrt by Jo-Philipp Wich | ||
<[email protected]>. | ||
|
||
Signed-off-by: Eneas U de Queiroz <[email protected]> | ||
|
||
--- a/build-aux/ltmain.in | ||
+++ b/build-aux/ltmain.in | ||
@@ -6434,13 +6434,13 @@ func_mode_link () | ||
add_dir= | ||
add= | ||
# Finalize command for both is simple: just hardcode it. | ||
- if test yes = "$hardcode_direct" && | ||
- test no = "$hardcode_direct_absolute"; then | ||
- add=$libdir/$linklib | ||
- elif test yes = "$hardcode_minus_L"; then | ||
+ if test "$hardcode_direct" = yes && | ||
+ test "$hardcode_direct_absolute" = no; then | ||
+ add="$libdir/$linklib" | ||
+ elif test "$hardcode_minus_L" = yes; then | ||
add_dir=-L$libdir | ||
- add=-l$name | ||
- elif test yes = "$hardcode_shlibpath_var"; then | ||
+ add="-l$name" | ||
+ elif test "$hardcode_shlibpath_var" = yes; then | ||
case :$finalize_shlibpath: in | ||
*":$libdir:"*) ;; | ||
*) func_append finalize_shlibpath "$libdir:" ;; |
Oops, something went wrong.
9060452
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
编译失败了