[gluegen2] Disable the use of static-libgcc and log the command line

Clément David davidcl at fedoraproject.org
Wed Nov 5 16:46:44 UTC 2014


commit 97d8933a26eb5361323bcdf451d2af8bc993e50e
Author: Clément DAVID <clement.david at scilab-enterprises.com>
Date:   Wed Nov 5 17:46:37 2014 +0100

    Disable the use of static-libgcc and log the command line

 gluegen2-0006-disable-static-libgcc.patch |  125 +++++++++++++++++++++++++++++
 gluegen2.spec                             |   10 ++-
 2 files changed, 131 insertions(+), 4 deletions(-)
---
diff --git a/gluegen2-0006-disable-static-libgcc.patch b/gluegen2-0006-disable-static-libgcc.patch
new file mode 100644
index 0000000..1330e41
--- /dev/null
+++ b/gluegen2-0006-disable-static-libgcc.patch
@@ -0,0 +1,125 @@
+--- a/make/gluegen-cpptasks-base.xml
++++ b/make/gluegen-cpptasks-base.xml
+@@ -1164,17 +1164,14 @@
+     <!-- Unix linker configuration -->
+ 
+     <linker id="linker.cfg.linux" name="${gcc.compat.compiler}">
+-      <linkerarg value="-static-libgcc" if="isGCC"/>
+     </linker>
+ 
+     <linker id="linker.cfg.linux.x86" name="${gcc.compat.compiler}">
+       <linkerarg value="-m32"/>
+-      <linkerarg value="-static-libgcc" if="isGCC"/>
+     </linker>
+ 
+     <linker id="linker.cfg.linux.amd64" name="${gcc.compat.compiler}">
+       <linkerarg value="-m64"/>
+-      <linkerarg value="-static-libgcc" if="isGCC"/>
+     </linker>
+ 
+     <!-- Using default compiler settings - utilize:
+@@ -1185,7 +1182,6 @@
+       <linkerarg value="-fpic" /> 
+       <linkerarg value="-nostdlib" />
+       <linkerarg value="-Bdynamic" />
+-      <linkerarg value="-static-libgcc" if="isGCC"/>
+     </linker>
+ 
+     <linker id="linker.cfg.linux.alpha" name="${gcc.compat.compiler}">
+@@ -1231,17 +1227,14 @@
+ 
+     <linker id="linker.cfg.solaris" name="${gcc.compat.compiler}"> 
+       <linkerarg value="-m32"/>
+-      <linkerarg value="-static-libgcc" if="isGCC"/>
+     </linker> 
+ 
+     <linker id="linker.cfg.solaris.sparcv9" name="${gcc.compat.compiler}"> 
+       <linkerarg value="-xarch=v9a" /> 
+-      <linkerarg value="-static-libgcc" if="isGCC"/>
+     </linker> 
+ 
+     <linker id="linker.cfg.solaris.amd64" name="${gcc.compat.compiler}"> 
+       <linkerarg value="-m64"/>
+-      <linkerarg value="-static-libgcc" if="isGCC"/>
+       <!-- linkerarg value="-xarch=amd64" / --> 
+     </linker>
+ 
+@@ -1256,7 +1249,6 @@
+       <linkerarg value="-arch" if="use.macosx64"/>
+       <linkerarg value="x86_64" if="use.macosx64"/>
+       <linkerarg value="-mmacosx-version-min=10.5"/>
+-      <linkerarg value="-static-libgcc" if="isGCC"/>
+       <!-- Note: Apple doesn't seem to provide ppc64 binaries on Leopard -->
+     </linker>
+ 
+@@ -1265,14 +1257,12 @@
+     <!--linker id="linker.cfg.linux64.mingw64" classname="net.sf.antcontrib.cpptasks.gcc.Gcc64Linker"-->
+     <linker id="linker.cfg.linux64.mingw64" classname="net.sf.antcontrib.cpptasks.gcc.GccLinker">
+       <linkerarg value="-m64"/>
+-      <linkerarg value="-static-libgcc" if="isGCC"/>
+     </linker>
+     
+     <!--linker id="linker.cfg.linux64.mingw32" classname="net.sf.antcontrib.cpptasks.gcc.Gcc32Linker"-->
+     <linker id="linker.cfg.linux64.mingw32" classname="net.sf.antcontrib.cpptasks.gcc.GccLinker">
+       <linkerarg value="-m32"/>
+       <linkerarg value="-Wl,--kill-at" />        <!-- remove @ from function names, ie no __stdcall @nn -->
+-      <linkerarg value="-static-libgcc" if="isGCC"/>
+     </linker>
+ 
+     <linker id="linker.cfg.win32.mingw" name="${gcc.compat.compiler}" incremental="false">
+@@ -1280,7 +1270,6 @@
+       <linkerarg value="-Wl,--enable-auto-import"/>    <!-- for linking against dll directly -->
+       <linkerarg value="-Wl,--enable-stdcall-fixup"/>  <!-- for linking against dll directly -->
+       <linkerarg value="-Wl,--kill-at" />        <!-- remove @ from function names, ie no __stdcall @nn -->
+-      <linkerarg value="-static-libgcc" if="isGCC"/>
+     </linker>
+ 
+     <linker id="linker.cfg.win64.mingw" name="${gcc.compat.compiler}" incremental="false">
+@@ -1288,7 +1277,6 @@
+       <linkerarg value="-Wl,--enable-auto-import"/>    <!-- for linking against dll directly -->
+       <linkerarg value="-Wl,--enable-stdcall-fixup"/>  <!-- for linking against dll directly -->
+       <linkerarg value="-Wl,--kill-at" />        <!-- remove @ from function names, ie no __stdcall @nn -->
+-      <linkerarg value="-static-libgcc" if="isGCC"/>
+     </linker>
+ 
+     <linker id="linker.cfg.win32.msvc" name="msvc" incremental="false">
+--- a/make/lib/gluegen-cpptasks-android-armv6.xml
++++ b/make/lib/gluegen-cpptasks-android-armv6.xml
+@@ -89,7 +89,6 @@
+          <linkerarg value="--demangle" /> 
+          <linkerarg value="--gc-sections" /> 
+          <linkerarg value="--no-undefined" /> 
+-         <linkerarg value="-static-libgcc"/>
+          <!-- The gcc from $NDK_TOOLCHAIN_ROOT/$TARGET_TRIPLE/bin needs to be told
+            where to find libgcc as the default location (gcc -print-search-dirs)
+            is not correct. Not sure if this is a bug in the NDK or not. We also
+--- a/make/lib/gluegen-cpptasks-android-armv7.xml
++++ b/make/lib/gluegen-cpptasks-android-armv7.xml
+@@ -89,7 +89,6 @@
+          <linkerarg value="--demangle" /> 
+          <linkerarg value="--gc-sections" /> 
+          <linkerarg value="--no-undefined" /> 
+-         <linkerarg value="-static-libgcc"/>
+          <!-- The gcc from $NDK_TOOLCHAIN_ROOT/$TARGET_TRIPLE/bin needs to be told
+            where to find libgcc as the default location (gcc -print-search-dirs)
+            is not correct. Not sure if this is a bug in the NDK or not. We also
+--- a/make/lib/gluegen-cpptasks-linux-armv6.xml
++++ b/make/lib/gluegen-cpptasks-linux-armv6.xml
+@@ -56,7 +56,6 @@
+       <linkerarg value="-mfloat-abi=softfp" />
+       <linkerarg value="-nostdlib" />
+       <linkerarg value="-Bdynamic" />
+-      <linkerarg value="-static-libgcc"/>
+     </linker>
+ </target>
+ 
+--- a/make/lib/gluegen-cpptasks-linux-armv6hf.xml
++++ b/make/lib/gluegen-cpptasks-linux-armv6hf.xml
+@@ -56,7 +56,6 @@
+       <linkerarg value="-mfloat-abi=hard" />
+       <linkerarg value="-nostdlib" />
+       <linkerarg value="-Bdynamic" />
+-      <linkerarg value="-static-libgcc"/>
+     </linker>
+ 
+ </target>
diff --git a/gluegen2.spec b/gluegen2.spec
index 4eb1dc6..2039a1e 100644
--- a/gluegen2.spec
+++ b/gluegen2.spec
@@ -15,6 +15,7 @@ Patch2:         %{name}-0002-use-fedora-jni.patch
 Patch3:         %{name}-0003-disable-executable-tmp-tests.patch
 Patch4:         %{name}-0004-add-antlr-jar-to-all-targets.patch
 Patch5:         %{name}-0005-use-system-antlib.patch
+Patch6:         %{name}-0006-disable-static-libgcc.patch
 
 BuildRequires:  java-devel >= 1:1.6.0
 BuildRequires:  jpackage-utils
@@ -84,6 +85,7 @@ sed -e "s|%%{_libdir}|%{_libdir}|;s|%%{name}|%{name}|" %{PATCH2} \
 %patch3 -p1
 %patch4 -p1
 %patch5 -p1
+%patch6 -p1
 
 # Remove any JNI files
 rm -fr make/stub_includes/jni
@@ -129,6 +131,7 @@ rm -f src/junit/com/jogamp/common/util/TestVersionSemantics.java src/junit/com/j
 
 cd make
 xargs -t ant <<EOF
+ -verbose
  -Dc.compiler.debug=true
  -Djavacdebug=false
 %ifarch x86_64
@@ -184,9 +187,9 @@ cp LICENSE.txt %{buildroot}%{_docdir}/%{name}/
 cp LICENSE.txt %{buildroot}%{_javadocdir}/%{name}/
 
 %check
-%ifarch %{ix86} x86_64
 cd make
 _JAVA_OPTIONS="-Djogamp.debug=true -Djava.library.path=../build/test/build/natives" xargs -t ant <<EOF
+ -verbose
  -Djavacdebug=true
  -Dc.compiler.debug=true
  -Djavacdebug=true
@@ -203,8 +206,6 @@ _JAVA_OPTIONS="-Djogamp.debug=true -Djava.library.path=../build/test/build/nativ
 
  junit.run
 EOF
-%endif
-
 
 rm -fr %{buildroot}%{_jnidir}/test
 
@@ -230,7 +231,8 @@ rm -fr %{buildroot}%{_jnidir}/test
 %changelog
 * Tue Sep 09 2014 Clément David <c.david86 at gmail.com> - 2.2.4-1
 - Update version
-- Disable %check for some platforms to fix the build
+- Disable the use of static-libgcc
+- Enable ant verbose build to trace native compilation calls
 
 * Sat Aug 16 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2.0.2-5
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild


More information about the scm-commits mailing list