Skip to content

Commit

Permalink
[windows] Test 0001-libtool-Fix-test-170-in-Cygwin-Mingw32.patch
Browse files Browse the repository at this point in the history
  • Loading branch information
ileanadumitrescu95 committed Aug 9, 2024
1 parent 65536ed commit a42b937
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 1 deletion.
3 changes: 2 additions & 1 deletion build-dev-tarball.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ git clone --depth 2 -b "$branch" https://git.savannah.gnu.org/git/"$package".git
git clone --depth 1 https://git.savannah.gnu.org/git/gnulib.git

# Apply patches.
(cd "$package" && patch -p1 < ../patches/0001-ltmain-Use-shared-objects-built-in-source-tree.patch)
(cd "$package" && patch -p1 < ../patches/0001-ltmain-Use-shared-objects-built-in-source-tree.patch \
&& patch -p1 < ../patches/0001-libtool-Fix-test-170-in-Cygwin-Mingw32.patch)

export GNULIB_SRCDIR=`pwd`/gnulib
cd "$package"
Expand Down
48 changes: 48 additions & 0 deletions patches/0001-libtool-Fix-test-170-in-Cygwin-Mingw32.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
From e3f762e59adb871b6b697e42c22f35bb64605332 Mon Sep 17 00:00:00 2001
From: Ileana Dumitrescu <ileanadumitrescu95@gmail.com>
Date: Fri, 9 Aug 2024 18:39:45 +0300
Subject: [PATCH] libtool: Fix test 170 in Cygwin/Mingw32

Test 170 in bug_62343.at is failing to link object files with a library
file. This is fixed by choosing the correct architecture version of a
compiler by using the 'CXX' macro.

tests/bug_62343.at: Replace 'g++' with 'CXX' macro
---
tests/bug_62343.at | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tests/bug_62343.at b/tests/bug_62343.at
index 75ceafd3..6aab18f5 100644
--- a/tests/bug_62343.at
+++ b/tests/bug_62343.at
@@ -42,7 +42,7 @@ int main() {
# So first try to compile without libtool first to test if the current environment
# supports the -no-canonical-prefixes flag. If it doesn't, skip the test.

-g++ -no-canonical-prefixes -c x.cpp
+$CXX -no-canonical-prefixes -c x.cpp

result=$?

@@ -50,7 +50,7 @@ if test 0 -ne "$result"; then
AT_SKIP_IF([:])
fi

-AT_CHECK([$LIBTOOL --mode=compile --tag=CXX g++ -no-canonical-prefixes -c x.cpp], [0], [stdout], [stderr])
+AT_CHECK([$LIBTOOL --mode=compile --tag=CXX $CXX -no-canonical-prefixes -c x.cpp], [0], [stdout], [stderr])

AT_CHECK([$GREP -- '-no-canonical-prefixes' stdout], [0], [ignore])

@@ -63,7 +63,7 @@ case $host_os in
;;
esac

-AT_CHECK([$LIBTOOL --mode=link --tag=CXX g++ -no-canonical-prefixes $host_flags -o libx.la -rpath /usr/lib64/ x.lo], [0], [stdout], [stderr])
+AT_CHECK([$LIBTOOL --mode=link --tag=CXX $CXX -no-canonical-prefixes $host_flags -o libx.la -rpath /usr/lib64/ x.lo], [0], [stdout], [stderr])

AT_CHECK([$GREP -- '-no-canonical-prefixes' stdout], [0], [ignore])

--
2.45.2

0 comments on commit a42b937

Please sign in to comment.