]> git.pld-linux.org Git - packages/flac.git/blob - x32.patch
- one more fix in x32 patch: despite 32-bit architecture, assume CPU as x86_64; fixes...
[packages/flac.git] / x32.patch
1 --- flac-1.3.1/configure.ac~    2014-12-25 12:11:41.000000000 +0000
2 +++ flac-1.3.1/configure.ac     2014-12-25 12:28:28.561894846 +0000
3 @@ -105,6 +105,14 @@
4  asm_optimisation=no
5  case "$host_cpu" in
6         x86_64)
7 +               case "$host" in
8 +                       *gnux32)
9 +                               cpu_x86_64=true
10 +                               AC_DEFINE(FLAC__CPU_X86_64)
11 +                               AH_TEMPLATE(FLAC__CPU_X86_64, [define if building for x86_64])
12 +                               asm_optimisation=$asm_opt
13 +                               ;;
14 +                       *)
15                 if test $ac_cv_sizeof_voidp = 4 ; then
16                         # This must be a 32 bit user space running on 64 bit kernel so treat
17                         # this as ia32.
18 @@ -118,6 +126,8 @@
19                         AH_TEMPLATE(FLAC__CPU_X86_64, [define if building for x86_64])
20                         fi
21                 asm_optimisation=$asm_opt
22 +                               ;;
23 +               esac
24                 ;;
25         i*86)
26                 cpu_ia32=true
27 @@ -150,6 +150,7 @@
28         *-*-cygwin|*mingw*) OBJ_FORMAT=win32 ;;
29         *-*-darwin*) OBJ_FORMAT=macho ;;
30         *emx*) OBJ_FORMAT=aout ;;
31 +       *gnux32*) OBJ_FORMAT=elfx32 ;;
32         *) OBJ_FORMAT=elf ;;
33  esac
34  AC_SUBST(OBJ_FORMAT)
35 @@ -370,6 +371,12 @@
36                 CPPFLAGS="$CPPFLAGS -DFLAC__USE_VISIBILITY_ATTR"
37                 CFLAGS="$CFLAGS -fvisibility=hidden"
38                 CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
39 +               fi
40 +
41 +       if test "$GCC_MAJOR_VERSION" -ge 4 && test "$OBJ_FORMAT" = elfx32; then
42 +               CPPFLAGS="$CPPFLAGS -DFLAC__USE_VISIBILITY_ATTR"
43 +               CFLAGS="$CFLAGS -fvisibility=hidden"
44 +               CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
45                 fi
46  
47         if test "$GCC_MAJOR_VERSION" -ge 4 && test "$OBJ_FORMAT" = macho; then
48 --- flac-1.3.1/src/libFLAC/ia32/nasm.h~ 2014-11-27 01:19:47.000000000 +0000
49 +++ flac-1.3.1/src/libFLAC/ia32/nasm.h  2014-12-25 12:31:46.790820947 +0000
50 @@ -50,6 +50,10 @@
51         %idefine code_section section .text align=16
52         %idefine data_section section .data align=32
53         %idefine bss_section  section .bss  align=32
54 +%elifdef OBJ_FORMAT_elfx32
55 +       %idefine code_section section .text align=16
56 +       %idefine data_section section .data align=32
57 +       %idefine bss_section  section .bss  align=32
58  %else
59         %error unsupported object format!
60  %endif
This page took 0.034725 seconds and 3 git commands to generate.