Commit Graph

145 Commits

Author SHA1 Message Date
Jeff Law 20749d9857
Strip LTO sections/symbols from installed .o/.a files 2020-02-14 13:39:34 +01:00
Jeff Law 3e759e70ac Allow conditionally adding -fcommon to CFLAGS by defining %_legacy_common_support
Co-Authored-By: Miro Hrončok <miro@hroncok.cz>
2020-01-23 14:25:11 +01:00
Florian Weimer fff3459086 Reenable annobin after GCC 10 integration (#1792892)
This reverts commit c18924507d
("Temporarily disable annobin for GCC 10 (#1792892)").
2020-01-20 13:52:38 +01:00
Florian Weimer c18924507d Temporarily disable annobin for GCC 10 (#1792892) 2020-01-20 11:42:04 +01:00
Pavel Raiskup e345575f97 %set_build_flags: define LT_SYS_LIBRARY_PATH
This config is to let libtool recognize that our 64bit variant of
%_libdir is actually on the standard/default library path, so libtool
doesn't think it has to be hard-wired as RPATH.  This is proper solution
for libtool RPATH issues described in:

  https://docs.fedoraproject.org/en-US/packaging-guidelines/#_removing_rpath

The libtool script/macros (new enough, v2.4.6+) honor this variable when
it isn't possible to detect the system-wide default library path.  It is
e.g. able to parse /etc/ld.so.* configuration, but there's no info about
/usr/lib64 on Fedora.

So to not force everybody to do:

   %configure LT_SYS_LIBRARY_PATH=...

... rather set this system-wide.  This is low-risk change since
older libtool scripts don't use this variable, and really no other
tools should.
2019-12-03 15:04:51 +01:00
Miro Hrončok 53617406d9 Move brp-python-bytecompile from rpm, so we can easily adapt it 2019-07-20 08:07:57 +02:00
Daniel Mach 38d0d92d5c Switch binary payload compression to Zstandard level 19
Fedora Change: https://fedoraproject.org/w/index.php?title=Changes/Switch_RPMs_to_zstd_compression
Bug: https://bugzilla.redhat.com/show_bug.cgi?id=1720729
Fesco ticket: https://pagure.io/fesco/issue/2144
Rel-eng ticket: https://pagure.io/releng/issue/8395
2019-07-01 16:41:12 +02:00
Vít Ondruch 86aae600e6 Enable RPM to set SOURCE_DATE_EPOCH environment variable.
If %source_date_epoch_from_changelog is true, RPM can set the SOURCE_DATE_EPOCH
environment variable to the timestamp of the topmost changelog entry. The
SOURCE_DATE_EPOCH can be in turn used by various projects to override otherwise
dynamically generated timestamps.

E.g. this might help to have stable timestamps in generated
documentation etc.
2019-06-27 08:41:44 +02:00
Jitka Plesnikova c68c6bd353 Remove perl macro refugees 2019-06-12 12:54:26 +02:00
Panu Matilainen bab65715b2 Provide temporary shelter for rpm 4.15 perl macro refugees
Rpm 4.15 removes various language-specific macros. Python side is
already covered by the versioned python macros but this is not the
case with Perl, macros. Add them here temporarily to avoid breaking
the world, but these really belong to perl-macros or such.
2019-06-10 14:12:21 +03:00
Panu Matilainen 20a0e63249 Drop redundant _smp_mflag re-definition, use the one from rpm instead
Once upon a time these did differ (for various bad reasons) but the
version in rpm has been identical to ours for many years, lets shed
some old baggage.
2019-01-15 12:02:22 +02:00
Florian Weimer e80fa1344a Build flags: Add support for extension builders (#1543394) 2018-12-20 11:34:27 +01:00
Miro Hrončok a212174975 Make automagic Python bytecompilation optional
https://fedoraproject.org/wiki/Changes/No_more_automagic_Python_bytecompilation_phase_2
2018-11-15 12:13:14 +01:00
Igor Gnatenko 357550f7ba
Enable --as-needed by default
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-08-15 07:00:14 +02:00
Igor Gnatenko ce50624ff0
fix type from previous commit
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-07-10 16:45:19 +02:00
Igor Gnatenko 85e473f982
Add option to add -Wl,--as-needed into LDFLAGS
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-07-10 16:41:33 +02:00
Igor Gnatenko 68e4ff270c
rename _strict_symbol_defs_build to _ld_strict_symbol_defs
It says more where to look and what it is supposed to do.

Acked-by: Florian Festi <ffesti@redhat.com>
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-07-10 16:41:33 +02:00
Panu Matilainen aa24434396 Merge #22 `Automatically trim changelog entries after 2 years` 2018-06-26 10:40:16 +00:00
Miro Hrončok c7d6417a3b Add a possibility to opt-out form automagic Python bytecompilation
That is, outside of Python specific directories.

More at https://fedoraproject.org/wiki/Changes/No_more_automagic_Python_bytecompilation
2018-05-28 14:26:20 +02:00
Peter Jones f7e8f73ead brp-mangle-shebangs: make it possible to use generated exclusion lists
This patch adds two additional rpm macros, __brp_mangle_shebangs_exclude_file
and __brp_mangle_shebangs_exclude_from_file, to specify files from which
to read the extended regexps used for excluding shebangs and target
files.

Additionally, this adds documentation in the macros file and
--help/--usage/-?/-h to brp-mangle-shebangs, so that it's possible to
actually discover what the intended behavior is without reading the
script itself.

Signed-off-by: Peter Jones <pjones@redhat.com>
2018-05-02 14:38:46 -04:00
Zbigniew Jędrzejewski-Szmek 8c5d5de24a Trim changelog entries older than two years
Inspired by http://gitweb.mageia.org/software/rpm/rpm-setup/tree/macros.in#n22
but changed to two years (3+ releases of Fedora).
2018-03-11 15:15:30 +01:00
Florian Weimer cd7779aeac First step of moving -z now to the gcc command line (#1548397) 2018-02-24 17:38:12 +01:00
Miro Hrončok fb05a239d2
Allow to opt-out from shebang mangling for specific paths/shebangs
Introduces __brp_mangle_shebangs_exclude_from and __brp_mangle_shebangs_exclude

 * the first allows to explude specific paths from the mangling
 * the second allows to exlude specific shebangs

Both are used with `grep -E`. Similar escaping rules as in [1] apply.

[1] https://fedoraproject.org/wiki/Packaging:AutoProvidesAndRequiresFiltering
2018-02-15 08:47:54 +01:00
Florian Weimer fa08f0e5a1 Add RPM macros for compiler/linker flags 2018-02-04 18:00:40 +01:00
Miro Hrončok 257a3a95c7 Add brp-mangle-shebangs 2018-01-30 13:31:25 +01:00
Igor Gnatenko 12ace9bdb9 Create DSO symlinks automatically
If there are unpackaged symlinks, build will fail with unpackaged files.
People can %undefine __brp_ldconfig if they need to and they should make
sure that they call ldconfig themselves.

Right now, script doesn't guide packagers what to do, but it's not
prerequisite.

Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-01-29 16:41:52 +01:00
Florian Weimer 8d6c6d0761 Build flags: Disable -z defs again (#1535422) 2018-01-29 15:18:11 +01:00
Florian Weimer 078af19261 Link with -z defs by default (#1535422) 2018-01-22 16:01:54 +01:00
Florian Weimer faa1ad44f7 Remove --param=ssp-buffer-size=4 from build flags
-fstack-protector-strong does not use frame size heuristics for
deciding which functions to instrument, so changing the parameter has
no effect.
2018-01-22 14:30:12 +01:00
Panu Matilainen 3bf139f646 Document how to disable hardened and annotated build (#1211296) 2018-01-19 12:21:06 +02:00
Panu Matilainen a747e7fb51 Fix the inevitable embarrassing typo in 77, doh 2018-01-17 12:57:53 +02:00
Panu Matilainen c4646d791d Macroize build root policies for consistent disable/override ability
Add a separate macro for each brp we have, using standard naming
convention and conditionalize the usage in %__os_install_post.
Voilà, we have a standard way to disable (and also override) any brp
scripts from specs that need it and a common scheme for new brps
to follow.

Note that this is not supposed to change the existing behavior and
default build root policy invocations at all, any change in those
would be a thinko/typo/copy-paste error in this commit.
2018-01-17 12:29:44 +02:00
Florian Weimer 6c35c254c2 Add _GLIBCXX_ASSERTIONS to CFLAGS/CXXFLAGS (#1515858) 2018-01-17 10:14:18 +01:00
Nick Clifton b5ea4b290b Enable binary annotations in compiler flags 2017-11-22 12:41:44 +01:00
Igor Gnatenko 00e8557ba2 Move _debuginfo_subpackages and _debugsource_packages from rpm (RHBZ #1476735)
References: https://bugzilla.redhat.com/show_bug.cgi?id=1476735
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2017-07-31 14:45:08 +02:00
Igor Gnatenko f6596a4ca5 Define _include_gdx_index (RHBZ #1476722)
References: https://bugzilla.redhat.com/show_bug.cgi?id=1476722
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2017-07-31 14:43:55 +02:00
Adam Williamson 6dc72405b3 Revert #1393492 changes, they break far too many builds
Per fweimer: "Sorry, we need to revert the -Werror=implicit-*
bits.  There is no chance we can get this working in any
reasonable time frame, there is simply too much breakage."
2016-12-06 14:45:53 -08:00
Panu Matilainen beb08c6bba Error on implicit function declaration and -return type for C (#1393492)
Add -Werror=implicit-function-declaration -Werror=implicit-int to
global cflags as per https://fedoraproject.org/wiki/Changes/Fedora26CFlags
2016-11-30 13:51:10 +02:00
Panu Matilainen 3081c4e7d5 Introduce macros for language specific compiler options
Introduce new language specific __global_fooflags for C, C++ and Fortran
This looks mildly strange and suspicious since because the global flags
get pulled in indirectly via %optflags (that doesn't change here but becomes
more obvious).

Depends on previous commit (8fe5b07871)
which was done separately to make the actual change (or lack of thereof)
stand out here.

This is not supposed to change any actual values for current usages,
so if it does it's a bug.

However there's a minor bonus involved for Fortran users who can now get
the correct FFLAGS/FCFLAGS for non-autoconf projects too by using
__global_fflags/fcflags
2016-11-30 13:41:57 +02:00
Panu Matilainen 8fe5b07871 Rename __global_cflags to __global_compiler_flags
Preparing for language specific compiler flag macros, this is
simply:

    perl -pi -e "s:__global_cflags:__global_compiler_flags:g" macros rpmrc

Since this looks like a much bigger change than it actually is, doing
it in a separate step without an associated build.
2016-11-30 13:37:12 +02:00
Panu Matilainen 3234495f75 Drop unwanted + unused brp-* scripts
If java people say brp-java-repack-jars is not needed then it
probably isn't (#1235770). brp-implant-ident-static hasn't been enabled
in 13+ years, I THINK it's safe to say its not critically needed.

Leaving the actual scripts in the repo for now (amusement for
archeologists of future generations, eh?)
2016-11-07 16:14:38 +02:00
Jason Tibbitts 9a4753b3e4 Remove hardcoded limit of 16 CPUs for make -j
There was a hardcoded limit of 16 on the value passed to make -j.  This
has been removed.  See
https://bugzilla.redhat.com/show_bug.cgi?id=1384938
2016-10-17 13:47:22 -05:00
Jason Tibbitts 7359cf0b80 And add a more descriptive comment. 2016-10-03 16:06:03 -05:00
Jason Tibbitts d3c4ff3299 Leave the macro undefined instead of defining to 0. 2016-10-03 14:30:19 -05:00
Jason Tibbitts a0145ecd2f Add %_configure_disable_silent_rules
Adds %_configure_disable_silent_rules, defaulting to 0, to optionally
enable the passing of --disable-silent-rules to configure scripts.
2016-10-03 12:55:00 -05:00
Florian Festi a91c848b8a - Support out of source builds for %_configure_gnuconfig_hack (#1191788)
- Fix typo in %kernel_module_package (#1159361)
2015-05-29 16:54:33 +02:00
Florian Festi db967d3586 - Add %py_auto_byte_compile macro controlling Python bytecompilation
(#976651)
2015-05-19 13:28:55 +02:00
Till Maas d9235d2d90 Enable hardened_build by default 2015-02-19 18:13:04 +01:00
Ville Skyttä 82a41dfa6a Drop brp-* scripts needlessly duplicated with rpm
One possible incompatibility, hopefully non-issue: our brp-strip*
allowed setting strip and objdump to use via args and STRIP and
OBJDUMP env vars whereas the rpm ones allow it through args only
(i.e. %{__strip} and %{__objdump} as far as specfiles are concerned).
2014-04-27 17:09:14 +03:00
Ville Skyttä 20c7e01657 Drop bunch of macro definitions needlessly duplicated with rpm
Specifically, the following are gone from here now: %_prefix,
%_sysconfdir, %_infodir, %_mandir, %_defaultdocdir, %_configure,
%makeinstall, %debug_package, %_use_internal_dependency_generator,
%_missing_doc_files_terminate_build, %_unpackaged_files_terminate_build
2014-04-27 12:02:23 +03:00