Browse code

darwin: use -read_only_relocs flag only on 32-bit x86

Avoids the linker warning:
ld: warning: -read_only_relocs cannot be used with x86_64

Signed-off-by: Mans Rullgard <mans@mansr.com>

Sean McGovern authored on 2011/03/16 10:01:17
Showing 1 changed files
... ...
@@ -2386,7 +2386,8 @@ case $target_os in
2386 2386
         enable malloc_aligned
2387 2387
         gas="gas-preprocessor.pl $cc"
2388 2388
         enabled ppc && add_asflags -force_cpusubtype_ALL
2389
-        SHFLAGS='-dynamiclib -Wl,-single_module -Wl,-install_name,$(SHLIBDIR)/$(SLIBNAME),-current_version,$(LIBVERSION),-compatibility_version,$(LIBMAJOR) -Wl,-read_only_relocs,suppress'
2389
+        SHFLAGS='-dynamiclib -Wl,-single_module -Wl,-install_name,$(SHLIBDIR)/$(SLIBNAME),-current_version,$(LIBVERSION),-compatibility_version,$(LIBMAJOR)'
2390
+        enabled x86_32 && append SHFLAGS -Wl,-read_only_relocs,suppress
2390 2391
         strip="${strip} -x"
2391 2392
         add_ldflags -Wl,-dynamic,-search_paths_first
2392 2393
         SLIBSUF=".dylib"