]> git.pld-linux.org Git - packages/flac.git/blobdiff - x32.patch
- fix build on x32 arch
[packages/flac.git] / x32.patch
diff --git a/x32.patch b/x32.patch
new file mode 100644 (file)
index 0000000..b4c05ba
--- /dev/null
+++ b/x32.patch
@@ -0,0 +1,36 @@
+--- flac-1.3.1/configure.ac~   2014-12-25 12:11:41.000000000 +0000
++++ flac-1.3.1/configure.ac    2014-12-25 12:28:28.561894846 +0000
+@@ -150,6 +150,7 @@
+       *-*-cygwin|*mingw*) OBJ_FORMAT=win32 ;;
+       *-*-darwin*) OBJ_FORMAT=macho ;;
+       *emx*) OBJ_FORMAT=aout ;;
++      *gnux32*) OBJ_FORMAT=elfx32 ;;
+       *) OBJ_FORMAT=elf ;;
+ esac
+ AC_SUBST(OBJ_FORMAT)
+@@ -370,6 +371,12 @@
+               CPPFLAGS="$CPPFLAGS -DFLAC__USE_VISIBILITY_ATTR"
+               CFLAGS="$CFLAGS -fvisibility=hidden"
+               CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
++              fi
++
++      if test "$GCC_MAJOR_VERSION" -ge 4 && test "$OBJ_FORMAT" = elfx32; then
++              CPPFLAGS="$CPPFLAGS -DFLAC__USE_VISIBILITY_ATTR"
++              CFLAGS="$CFLAGS -fvisibility=hidden"
++              CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
+               fi
+       if test "$GCC_MAJOR_VERSION" -ge 4 && test "$OBJ_FORMAT" = macho; then
+--- flac-1.3.1/src/libFLAC/ia32/nasm.h~        2014-11-27 01:19:47.000000000 +0000
++++ flac-1.3.1/src/libFLAC/ia32/nasm.h 2014-12-25 12:31:46.790820947 +0000
+@@ -50,6 +50,10 @@
+       %idefine code_section section .text align=16
+       %idefine data_section section .data align=32
+       %idefine bss_section  section .bss  align=32
++%elifdef OBJ_FORMAT_elfx32
++      %idefine code_section section .text align=16
++      %idefine data_section section .data align=32
++      %idefine bss_section  section .bss  align=32
+ %else
+       %error unsupported object format!
+ %endif
This page took 0.037737 seconds and 4 git commands to generate.