1 # 2 # 64-bit platform settings for Solaris packages 3 # 4 # Copyright 2007 Sun Microsystems, Inc. 5 # 6 # Solaris.inc must be included before this file 7 8 %ifarch amd64 sparcv9 9 10 %ifarch amd64 11 %define _arch64 amd64 12 %else 13 %define _arch64 sparcv9 14 %endif 15 16 %define opt_sse2 0 17 %define opt_arch64 1 18 %define can_isaexec 1 19 %define gtk_doc_option --disable-gtk-doc 20 21 %if %option_with_gnu_iconv 22 %define arch_ldadd -L%{_libdir} -R%{_libdir} -Wl,-zignore -R/usr/gnu/lib/%{_arch64} -lgnuintl -lgnuiconv 23 %else 24 %define arch_ldadd -L%{_libdir} -R%{_libdir} 25 %endif 26 27 %ifarch amd64 28 %define opt_amd64 1 29 %define bld_arch "amd64" 30 %else 31 %define opt_sparcv9 1 32 %define bld_arch "sparcv9" 33 %endif 34 35 %if %debug_build 36 %define pkgbuild_postprocess /bin/true 37 %define _cc64_opt_level -g 38 %define _cxx64_opt_level -g 39 %define _gcc64_opt_level -g 40 %define _gxx64_opt_level -g 41 %else 42 %define _gcc64_opt_level -O3 43 %define _gxx64_opt_level -O3 44 %define _cc64_opt_level -xO4 -xspace 45 %define _cxx64_opt_level -xO3 -xspace 46 %endif 47 48 %ifarch sparc 49 %define gcc_optflags64 %_gcc64_opt_level -mcpu=ultrasparc -m64 -Xlinker -i %gcc_picflags 50 %define gcc_cxx_optflags64 %gcc_optflags64 51 %endif 52 53 %ifarch i386 54 %define gcc_optflags64 %_gcc64_opt_level -march=opteron -m64 -Xlinker -i -fno-omit-frame-pointer %gcc_picflags 55 %define gcc_cxx_optflags64 %gcc_optflags64 56 %endif 57 58 %ifarch sparc 59 %define suncc_optflags64 -i %_cc64_opt_level -xstrconst -xarch=v9 -xcode=pic32 -mr 60 %define suncc_cxx_optflags64 -i %_cxx64_opt_level -xarch=v9 -xcode=pic32 -mr -norunpath 61 %endif 62 63 %ifarch i386 64 %if %cc_is_ss12 65 %define suncc_optflags64 -i %_cc64_opt_level -xstrconst -m64 -Kpic -xregs=no%%frameptr 66 %else 67 %define suncc_optflags64 -i %_cc64_opt_level -xstrconst -xarch=generic64 -Kpic -xregs=no%%frameptr 68 %endif 69 %define suncc_cxx_optflags64 -i %_cxx64_opt_level -xarch=generic64 -Kpic -pentium -mr -norunpath -xregs=no%%frameptr 70 %endif 71 72 %if %cc_is_gcc 73 74 %define picflags %gcc_picflags 75 %define optflags64 %gcc_optflags64 76 %define cxx_optflags64 %gcc_cxx_optflags64 77 78 %else 79 # cc is not gcc 80 81 %define picflags %suncc_picflags 82 %define optflags64 %suncc_optflags64 83 %define cxx_optflags64 %suncc_cxx_optflags64 84 85 %endif 86 87 %define optflags %optflags64 ${EXTRA_CFLAGS} 88 %define gcc_optflags %gcc_optflags64 ${EXTRA_CFLAGS} 89 %define cxx_optflags %cxx_optflags64 ${EXTRA_CXXFLAGS} 90 %define gcc_cxx_optflags %gcc_cxx_optflags64 ${EXTRA_CXXFLAGS} 91 92 %define _bindir %{_prefix}/bin/%{bld_arch} 93 %define _libdir %{_prefix}/lib/%{bld_arch} 94 %define _libexecdir %{_prefix}/lib/%{bld_arch} 95 %define _pkg_config_path %{_libdir}/pkgconfig 96 # obsolete, don't use: 97 %define _pkg_config_path64 %{_prefix}/lib/%{_arch64}/pkgconfig 98 99 %endif 100 101 # ChangeLog: 102 # 2008-06-20 Laszlo (Laca) Peter <laca (at] sun.com> 103 # - always define gcc_* macros, not only when cc_is_gcc, useful in spec 104 # files that force using gcc 105 # 2008-03-30 Laszlo (Laca) Peter <laca (at] sun.com> 106 # - use -m64 with ss12 107 # 2007-09-28 Laszlo (Laca) Peter <laca (at] sun.com> 108 # - add /usr/gnu/lib/%{_arch64} to RPATH and link with GNU libintl and libiconv 109 # when building with the --with-gnu-iconv option 110 # 2007-03-20 Doug Scott <dougs (at] truemail.co.th> 111 # - Added %_cc64_opt_level to suncc_optflags64 for i386 112 # 2007-03-19 Doug Scott <dougs (at] truemail.co.th> 113 # - Fixed -fno-omit-frame-pointer flag 114 # 2007-03-15 Laszlo (Laca) Peter <laca (at] sun.com> 115 # - renamed from amd64.inc 116 # - updated to work for either amd64 or sparcv9 117 # 2007-03-12 Doug Scott <dougs (at] truemail.co.th> 118