Commit Graph

131 Commits

Author SHA1 Message Date
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
Ville Skyttä
20a45694f9 Trim trailing whitespace 2014-04-27 11:58:46 +03:00
Panu Matilainen
43629272a8 - Allow opting out of config.{guess,sub} replacement hack (#991613) 2014-04-08 13:30:58 +03:00
Panu Matilainen
c8cbd244cf - Move the remaining dependency generator stuff to the kmp macro package
- Stop overriding rpm external dependency generator settings by default
- No normal package should ever end up using the old unmaintained
  dependency generator scripts from here, but the kmp system depends
  for now on the way this was previously set up here so letting
  that old cruft live in the non-default package for now.
2014-04-08 12:36:08 +03:00
Panu Matilainen
0e6d36bee9 Split kernel module macros to a separate file 2014-04-07 14:38:58 +03:00
Kevin Fenzi
6c38f18be2 Update libtool hardening hack and re-enable (#978949) 2014-01-25 10:10:32 +02:00
Dhiru Kholia
33b9cbdc67 Enable "-Werror=format-security" by default (#1043495) 2014-01-25 10:10:32 +02:00
Kevin Fenzi
e606f56f34 Make docdirs unversioned on Fedora 20+ (#986871) 2014-01-25 10:03:26 +02:00
Kevin Fenzi
b4b00eca04 Hack around libtool issue for hardened build for now (#978949) 2014-01-25 10:03:26 +02:00
Panu Matilainen
d4c5b38371 - switch from -fstack-protector to -fstack-protector-strong (#978763) 2014-01-25 10:03:26 +02:00
Panu Matilainen
5f7da21873 - make cpu limit for building configurable through _smp_ncpus_max macro - forward "port" from rhel-6 (#669638) 2014-01-25 10:03:26 +02:00
Panu Matilainen
0466a24ccb - Also set FCFLAGS from %%configure (#914831) 2014-01-25 10:03:26 +02:00
Panu Matilainen
2a557175eb - Switch back to manual config.guess/sub copies for reproducability - Replace config.guess/sub from %%configure again (#951442) 2014-01-25 10:03:14 +02:00
Panu Matilainen
b9eb0a184b - Add -grecord-gcc-switches to global CFLAGS (#951669) 2014-01-25 00:41:21 +02:00
Toshio Kuratomi
1891cc0aeb Patch to fix spaces in files used in filtering macros
https://bugzilla.redhat.com/show_bug.cgi?id=783932
2014-01-25 00:35:48 +02:00