1
|
1 |
#
|
|
2 |
# Base (32-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 sparc
|
|
9 |
%define bld_arch "sparc"
|
|
10 |
%else
|
|
11 |
%define bld_arch "i386"
|
|
12 |
%endif
|
|
13 |
|
|
14 |
%define opt_arch64 0
|
|
15 |
%define opt_sparcv9 0
|
|
16 |
%define opt_amd64 0
|
|
17 |
%define opt_sse2 0
|
|
18 |
|
|
19 |
# use --without-gtk-doc to disable building gtk-docs (it takes quite
|
|
20 |
# a while to build them)
|
|
21 |
# default: build gtk-doc API docs
|
|
22 |
%define gtk_doc_option %{?!_without_gtk_doc:--enable-gtk-doc}%{?_without_gtk_doc:--disable-gtk-doc}
|
|
23 |
|
|
24 |
%if %option_with_gnu_iconv
|
|
25 |
%define arch_ldadd -Wl,-zignore -R/usr/gnu/lib -lgnuintl -lgnuiconv
|
|
26 |
%else
|
|
27 |
%define arch_ldadd
|
|
28 |
%endif
|
|
29 |
|
|
30 |
%if %debug_build
|
|
31 |
%define pkgbuild_postprocess /bin/true
|
|
32 |
%define _cc_opt_level -g
|
|
33 |
%define _cxx_opt_level -g
|
|
34 |
%define _gcc_opt_level -g
|
|
35 |
%define _gxx_opt_level -g
|
|
36 |
%else
|
|
37 |
%define _gcc_opt_level -O3
|
|
38 |
%define _gxx_opt_level -O3
|
|
39 |
%define _cc_opt_level -xO4 -xspace
|
|
40 |
%define _cxx_opt_level -xO3 -xspace
|
|
41 |
%endif
|
|
42 |
|
|
43 |
%ifarch sparc
|
|
44 |
%define gcc_optflags %_gcc_opt_level -mv8plus -Xlinker -i %gcc_picflags
|
|
45 |
%define gcc_cxx_optflags %_gxx_opt_level -mv8plus -Xlinker -i %gcc_picflags
|
|
46 |
%endif
|
|
47 |
|
|
48 |
%ifarch i386
|
|
49 |
%define gcc_optflags %_gcc_opt_level -march=i586 -Xlinker -i -fno-omit-frame-pointer %gcc_picflags
|
|
50 |
%define gcc_cxx_optflags %_gxx_opt_level -march=i586 -Xlinker -i -fno-omit-frame-pointer %gcc_picflags
|
|
51 |
%endif
|
|
52 |
|
|
53 |
%ifarch sparc
|
|
54 |
%define suncc_optflags -i %_cc_opt_level -xstrconst -xarch=v8a -mr -xmemalign=4i
|
|
55 |
%define suncc_cxx_optflags -i %_cxx_opt_level -xarch=v8a -mr -norunpath -compat=5
|
|
56 |
%endif
|
|
57 |
|
|
58 |
%ifarch i386
|
|
59 |
%define suncc_optflags -i %_cc_opt_level -xstrconst -xpentium -mr -xregs=no%%frameptr
|
|
60 |
%define suncc_cxx_optflags -i %_cxx_opt_level -pentium -mr -norunpath -xregs=no%%frameptr -compat=5
|
|
61 |
%endif
|
|
62 |
|
|
63 |
%if %cc_is_gcc
|
|
64 |
|
|
65 |
%define picflags %gcc_picflags
|
|
66 |
%define optflags %gcc_optflags
|
|
67 |
%define cxx_optflags %gcc_cxx_optflags
|
|
68 |
|
|
69 |
%else
|
|
70 |
# cc is not gcc
|
|
71 |
|
|
72 |
%define picflags %suncc_picflags
|
|
73 |
%define optflags %suncc_optflags ${EXTRA_CFLAGS}
|
|
74 |
%define cxx_optflags %suncc_cxx_optflags ${EXTRA_CXXFLAGS}
|
|
75 |
|
|
76 |
%endif
|
|
77 |
|
|
78 |
%define _bindir %{_prefix}/bin
|
|
79 |
%define _libdir %{_prefix}/lib
|
|
80 |
%define _libexecdir %{_prefix}/lib
|
|
81 |
%define _pkg_config_path %{_libdir}/pkgconfig:%{_datadir}/pkgconfig
|
|
82 |
%define _sysconfdir /etc
|
|
83 |
|
|
84 |
# ChangeLog:
|
|
85 |
# 2008-09-13 Laszlo (Laca) Peter <[email protected]>
|
|
86 |
# - add -compat=5 option to Sun Studio CXXFLAGS as required by PSARC/2002/348
|
|
87 |
# 2007-09-28 Laszlo (Laca) Peter <[email protected]>
|
|
88 |
# - add /usr/gnu/lib to the RUNPATH and link with GNU libintl and libiconv
|
|
89 |
# when building with the --with-gnu-iconv option
|
|
90 |
# 2007-08-09 Laszlo (Laca) Peter <[email protected]>
|
|
91 |
# - delete cc_is_gcc conditional when setting _gcc_opt_level,
|
|
92 |
# because we want this set anyway so it can be used in spec
|
|
93 |
# files that force gcc
|
|
94 |
# 2007-05-17 Laszlo (Laca) Peter <[email protected]>
|
|
95 |
# - add -xmemalign=4i for sparc builds for binary compatibility with
|
|
96 |
# apps compiled with earlier versions of Sun Studio, fixes 6457446
|
|
97 |
# 2007-04-05 Laszlo (Laca) Peter <[email protected]>
|
|
98 |
# - fix cxx_optflags: use EXTRA_CXXFLAGS and not EXTRA_LDFLAGS
|
|
99 |
# 2007-03-19 Doug Scott <[email protected]>
|
|
100 |
# - Fixed -fno-omit-frame-pointer flag
|
|
101 |
# 2007-03-15 Laszlo (Laca) Peter <[email protected]>
|
|
102 |
# - copied from x86_sse2.inc
|
|
103 |
# - new include file that resets macros to their default (32-bit build)
|
|
104 |
# values
|
|
105 |
# 2007-03-12 Doug Scott <[email protected]>
|