0
|
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 |
%define suncc_optflags64 -i %_cc64_opt_level -xstrconst -m64 -Kpic -xregs=no%%frameptr
|
|
65 |
%define suncc_cxx_optflags64 -i %_cxx64_opt_level -xarch=generic64 -Kpic -pentium -mr -norunpath -xregs=no%%frameptr
|
|
66 |
%endif
|
|
67 |
|
|
68 |
%if %cc_is_gcc
|
|
69 |
|
|
70 |
%define picflags %gcc_picflags
|
|
71 |
%define optflags64 %gcc_optflags64
|
|
72 |
%define cxx_optflags64 %gcc_cxx_optflags64
|
|
73 |
|
|
74 |
%else
|
|
75 |
# cc is not gcc
|
|
76 |
|
|
77 |
%define picflags %suncc_picflags
|
|
78 |
%define optflags64 %suncc_optflags64
|
|
79 |
%define cxx_optflags64 %suncc_cxx_optflags64
|
|
80 |
|
|
81 |
%endif
|
|
82 |
|
|
83 |
%define optflags %optflags64 ${EXTRA_CFLAGS}
|
|
84 |
%define gcc_optflags %gcc_optflags64 ${EXTRA_CFLAGS}
|
|
85 |
%define cxx_optflags %cxx_optflags64 ${EXTRA_CXXFLAGS}
|
|
86 |
%define gcc_cxx_optflags %gcc_cxx_optflags64 ${EXTRA_CXXFLAGS}
|
|
87 |
|
|
88 |
%define _bindir %{_prefix}/bin/%{bld_arch}
|
|
89 |
%define _libdir %{_prefix}/lib/%{bld_arch}
|
|
90 |
%define _libexecdir %{_prefix}/lib/%{bld_arch}
|
|
91 |
%define _pkg_config_path %{_libdir}/pkgconfig:%{_datadir}/pkgconfig
|
|
92 |
# obsolete, don't use:
|
|
93 |
%define _pkg_config_path64 %{_prefix}/lib/%{_arch64}/pkgconfig:%{_datadir}/pkgconfig
|
|
94 |
|
|
95 |
%endif
|
|
96 |
|
|
97 |
# ChangeLog:
|
|
98 |
# 2009-12-30 Halton Huo <[email protected]>
|
|
99 |
# - Remove cc_is_ssxx macros since we use ss12 always
|
|
100 |
# 2008-06-20 Laszlo (Laca) Peter <[email protected]>
|
|
101 |
# - always define gcc_* macros, not only when cc_is_gcc, useful in spec
|
|
102 |
# files that force using gcc
|
|
103 |
# 2008-03-30 Laszlo (Laca) Peter <[email protected]>
|
|
104 |
# - use -m64 with ss12
|
|
105 |
# 2007-09-28 Laszlo (Laca) Peter <[email protected]>
|
|
106 |
# - add /usr/gnu/lib/%{_arch64} to RPATH and link with GNU libintl and libiconv
|
|
107 |
# when building with the --with-gnu-iconv option
|
|
108 |
# 2007-03-20 Doug Scott <[email protected]>
|
|
109 |
# - Added %_cc64_opt_level to suncc_optflags64 for i386
|
|
110 |
# 2007-03-19 Doug Scott <[email protected]>
|
|
111 |
# - Fixed -fno-omit-frame-pointer flag
|
|
112 |
# 2007-03-15 Laszlo (Laca) Peter <[email protected]>
|
|
113 |
# - renamed from amd64.inc
|
|
114 |
# - updated to work for either amd64 or sparcv9
|
|
115 |
# 2007-03-12 Doug Scott <[email protected]>
|