1986646f85
On Fri, 29 Jul 2005, Ulrich Drepper wrote: > Please find attached the hopefully final changes for the compile flags. > It's a patch against redhat-rpm-config-8.0.36-1.src.rpm. The changes are: > > ~ enable stack protector with minimal size 4 (default is 8, too high > IMO). Vlad ran some tests on SPEC. SPEC is highly CPU intensive, > unlike 90%+ of the distribution. Even in those tests the performance > decrease was below 1%, probably even in the noise. Especially the > decrease of the minimum size to 4 made no measurable impact. > > ~ remove the -fsigned-char flag for ppc. glibc has not been compiled > with the flag anyway, so if anything changes, we eliminate some bugs. > The only theoretical issue would be if a library we ship uses CHAR_MAX > in an interface. I personally haven't seen this for good reasons. > The only interface I know is localeconv(3) in glibc and this interface > is now corrected. > > ~ minor fix for SPARC
159 lines
4.7 KiB
Plaintext
159 lines
4.7 KiB
Plaintext
# Per-platform rpm configuration file.
|
|
|
|
#==============================================================================
|
|
# ---- per-platform macros.
|
|
#
|
|
%_vendor redhat
|
|
%_os linux
|
|
%_gnu -gnu
|
|
%_target_platform %{_target_cpu}-%{_vendor}-%{_target_os}%{?_gnu}
|
|
|
|
#==============================================================================
|
|
# ---- configure macros. note that most of these are inherited
|
|
# from the defaults.
|
|
#
|
|
%_prefix /usr
|
|
%_sysconfdir /etc
|
|
%_localstatedir /var
|
|
%_infodir /usr/share/info
|
|
%_mandir /usr/share/man
|
|
%_initrddir %{_sysconfdir}/rc.d/init.d
|
|
|
|
%_defaultdocdir %{_usr}/share/doc
|
|
|
|
%_enable_debug_packages 1
|
|
|
|
#==============================================================================
|
|
# ---- configure and makeinstall.
|
|
#
|
|
%configure \
|
|
CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \
|
|
CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \
|
|
FFLAGS="${FFLAGS:-%optflags}" ; export FFLAGS ; \
|
|
for i in $(find . -name config.guess -o -name config.sub) ; do \
|
|
[ -f /usr/lib/rpm/redhat/$(basename $i) ] && %{__rm} -f $i && %{__cp} -fv /usr/lib/rpm/redhat/$(basename $i) $i ; \
|
|
done ; \
|
|
./configure --build=%{_build} --host=%{_host} \\\
|
|
--target=%{_target_platform} \\\
|
|
--program-prefix=%{?_program_prefix} \\\
|
|
--prefix=%{_prefix} \\\
|
|
--exec-prefix=%{_exec_prefix} \\\
|
|
--bindir=%{_bindir} \\\
|
|
--sbindir=%{_sbindir} \\\
|
|
--sysconfdir=%{_sysconfdir} \\\
|
|
--datadir=%{_datadir} \\\
|
|
--includedir=%{_includedir} \\\
|
|
--libdir=%{_libdir} \\\
|
|
--libexecdir=%{_libexecdir} \\\
|
|
--localstatedir=%{_localstatedir} \\\
|
|
--sharedstatedir=%{_sharedstatedir} \\\
|
|
--mandir=%{_mandir} \\\
|
|
--infodir=%{_infodir}
|
|
|
|
%makeinstall \
|
|
%{__make} \\\
|
|
prefix=%{?buildroot:%{buildroot}}%{_prefix} \\\
|
|
exec_prefix=%{?buildroot:%{buildroot}}%{_exec_prefix} \\\
|
|
bindir=%{?buildroot:%{buildroot}}%{_bindir} \\\
|
|
sbindir=%{?buildroot:%{buildroot}}%{_sbindir} \\\
|
|
sysconfdir=%{?buildroot:%{buildroot}}%{_sysconfdir} \\\
|
|
datadir=%{?buildroot:%{buildroot}}%{_datadir} \\\
|
|
includedir=%{?buildroot:%{buildroot}}%{_includedir} \\\
|
|
libdir=%{?buildroot:%{buildroot}}%{_libdir} \\\
|
|
libexecdir=%{?buildroot:%{buildroot}}%{_libexecdir} \\\
|
|
localstatedir=%{?buildroot:%{buildroot}}%{_localstatedir} \\\
|
|
sharedstatedir=%{?buildroot:%{buildroot}}%{_sharedstatedir} \\\
|
|
mandir=%{?buildroot:%{buildroot}}%{_mandir} \\\
|
|
infodir=%{?buildroot:%{buildroot}}%{_infodir} \\\
|
|
install
|
|
|
|
%_smp_mflags %([ -z "$RPM_BUILD_NCPUS" ] \\\
|
|
&& RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`"; \\\
|
|
[ "$RPM_BUILD_NCPUS" -gt 1 ] && echo "-j$RPM_BUILD_NCPUS")
|
|
|
|
#==============================================================================
|
|
# ---- Build policy macros.
|
|
#
|
|
#---------------------------------------------------------------------
|
|
# Expanded at end of %install scriptlet.
|
|
#
|
|
|
|
%__arch_install_post %{nil}
|
|
|
|
%__os_install_post \
|
|
/usr/lib/rpm/redhat/brp-compress \
|
|
/usr/lib/rpm/redhat/brp-strip %{__strip} \
|
|
/usr/lib/rpm/redhat/brp-strip-static-archive %{__strip} \
|
|
/usr/lib/rpm/redhat/brp-strip-comment-note %{__strip} %{__objdump} \
|
|
/usr/lib/rpm/brp-python-bytecompile \
|
|
%{nil}
|
|
|
|
# /usr/lib/rpm/redhat/brp-implant-ident-static
|
|
|
|
%__spec_install_post\
|
|
%{?__debug_package:%{__debug_install_post}}\
|
|
%{__arch_install_post}\
|
|
%{__os_install_post}\
|
|
%{nil}
|
|
|
|
|
|
# Template for debug information sub-package.
|
|
# NOTE: This is a copy from rpm to get the ifnarch noarch fix, it can be removed later
|
|
%debug_package \
|
|
%ifnarch noarch\
|
|
%global __debug_package 1\
|
|
%package debuginfo \
|
|
Summary: Debug information for package %{name}\
|
|
Group: Development/Debug\
|
|
%description debuginfo\
|
|
This package provides debug information for package %{name}.\
|
|
Debug information is useful when developing applications that use this\
|
|
package or when debugging this package.\
|
|
%files debuginfo -f debugfiles.list\
|
|
%defattr(-,root,root)\
|
|
%endif\
|
|
%{nil}
|
|
|
|
# Bad hack to set $LANG to C during all RPM builds
|
|
%prep \
|
|
%%prep\
|
|
LANG=C\
|
|
export LANG\
|
|
unset DISPLAY\
|
|
%{nil}
|
|
|
|
%build %%build\
|
|
LANG=C\
|
|
export LANG\
|
|
unset DISPLAY\
|
|
%{nil}
|
|
|
|
%install %{?_enable_debug_packages:%{?buildsubdir:%{debug_package}}}\
|
|
%%install\
|
|
LANG=C\
|
|
export LANG\
|
|
unset DISPLAY\
|
|
%{nil}
|
|
|
|
%find_lang /usr/lib/rpm/redhat/find-lang.sh %{buildroot}
|
|
|
|
#
|
|
# use internal dep generator?
|
|
%_use_internal_dependency_generator 1
|
|
|
|
#
|
|
# Should missing %doc files terminate a build?
|
|
%_missing_doc_files_terminate_build 1
|
|
|
|
#
|
|
# Should unpackaged files in a build root terminate a build?
|
|
%_unpackaged_files_terminate_build 1
|
|
|
|
%__find_provides /usr/lib/rpm/redhat/find-provides
|
|
%__find_requires /usr/lib/rpm/redhat/find-requires
|
|
|
|
%__global_cflags -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4
|
|
|
|
# Disable lookups
|
|
%_hkp_keyserver %{nil}
|