Commit Graph

761 Commits

Author SHA1 Message Date
Davide Cavalca
04a4350d3e Add conditional support for always including frame pointers
If `%_include_frame_pointers` is defined, add `-fno-omit-frame-pointer`
and `-mno-omit-leaf-frame-pointer` to the compiler flags to ensure frame
pointers are always included.

This is in preparation for
https://fedoraproject.org/wiki/Changes/fno-omit-frame-pointer
2022-12-28 13:12:39 -08:00
Florian Weimer
f857d65cdd Add %_configure_use_runstatedir to disable --runstatedir 2022-12-10 13:39:25 +01:00
Siddhesh Poyarekar
ac9b7aed66 Fix last changelog entry 2022-12-08 14:32:46 -05:00
Tom Stellard
4c63cb687e Remove unsupported arches from rpmrc
I would like to try to move the optflags definition into the macro file
to make it cleaner and easier to maintain, so to make that easier, I
wanted to start by removing unsupported arches, so there is less code
to move.
2022-11-10 06:08:08 +00:00
Florian Weimer
937cfbaa8e Update spec file for: Set -g when building Vala applications 2022-11-04 09:56:11 +01:00
Florian Weimer
3e8695eaed Merge #217 Set -g when building Vala applications 2022-11-04 08:52:49 +00:00
Timm Bäder
25ea080503 Fix brp-llvm-compile-lto to not rely on a backtracking regex
Instead, grep the llvm-strings output for "-flto" and "-fno-lto" and
recognize the input as LTO input if -flto has a byte index greater than
-fno-lto.
2022-09-23 13:14:00 +02:00
Michael Catanzaro
d0970582ad Set -g when building Vala applications
This requires the build system support VALAFLAGS. At least Meson and
Automake do.

Using -g is desired because it allows us to see Vala source files and
line numbers in backtraces when possible, falling back to generated C
code otherwise. Line numbers for generated C are almost always less
useful when debugging crashes.
2022-09-13 12:44:51 -05:00
Jason Tibbitts
b2a58c86fb Fix up odd date specification in changelog. 2022-09-08 13:11:57 -05:00
Maxwell G
b16517ce77
forge macros: Support Sourcehut. Fixes rhbz#2035935. 2022-09-08 12:39:25 -05:00
Frederic Berat
c0d29236fe macros: Add runstatedir option to configure
The %configure macro now uses the runstatedir option if available.
2022-08-30 15:40:38 +02:00
Dan Horák
bddb41760d move the baseline arch to z13 for s390x in F-38+
https://fedoraproject.org/wiki/Changes/z13BaselineForIBMZ
2022-08-26 16:07:02 +02:00
Maxwell G
7b8ce09ce7
Actually bump %release 2022-08-22 16:39:32 -05:00
Maxwell G
483a3b89d7
Add macros.shell-completions 2022-08-08 15:04:56 -05:00
Nikita Popov
7bb71e872d brp-llvm-compile-lto-elf: Pass -r to xargs
If there are no .o/.a files to be distributed, this prevents
check_convert_bitcode from being called without a file argument,
in which case the first flag is going to be treated like the file
name, resulting in something like:

    realpath: invalid option -- 'O'
    Try 'realpath --help' for more information.
    Usage: file [-bcCdEhikLlNnprsSvzZ0] [--apple] [--extension] [--mime-encoding]
                [--mime-type] [-e <testname>] [-F <separator>]  [-f <namefile>]
                [-m <magicfiles>] [-P <parameter=value>] [--exclude-quiet]
                <file> ...
           file -C [-m <magicfiles>]
           file [--help]
2022-08-05 12:26:22 +02:00
Timm Bäder
6024b1e611 Move llvm_compile_lto_to_elf before __debug_install_post
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2082081
2022-06-22 12:56:17 +02:00
Nick Clifton
e7f471687c Add definition of _find_debuginfo_extra_opts which will move annobin data into a separate debuginfo file. 2022-06-17 11:33:00 +01:00
Tom Stellard
f77dcdec18 Fix passing of CFLAGS to brp-llvm-compile-lto-elf
This was accidentally broken by d9c7e4eef8.
2022-06-14 07:21:24 -07:00
Tom Stellard
9a1b602bdb Move -fno-openmp-implicit-rpath option from CFLAGS to LDFLAGS
This option needs to be passed to the linker not the compiler.
2022-05-27 16:09:09 +00:00
Tom Stellard
4f02aa74c5 Add test case for rhbz#2083296 2022-05-27 15:39:20 +00:00
Tom Stellard
1f3e0863cc Convert tests to tmt
Also pull the gcc-fedora-flags test from rpms/gcc and pull the
clang-fedora-flags from rpms/clang.
2022-05-27 15:38:54 +00:00
Florian Weimer
b95ec8412d Use %baserelease to store the version number
After this change, rpmdev-bumpspec does the right thing.
2022-05-27 16:49:46 +02:00
Frederic Berat
ad341c8d46 gnuconfig: sync with upstream git 2022-05-27 16:39:40 +02:00
Maxwell G
663af770a8
Add Requires: ansible-srpm-macros 2022-05-17 18:04:43 -05:00
Miro Hrončok
6cce360fd2 Remove a tab character from the definition of %__global_compiler_flags
From https://bugzilla.redhat.com/2083296:

> The issue is that some packages break up the flags at spaces,
> in order to look for specific flags or to add flags of their own.
>  The z3 package, for example, has some python code that does this:
>
>     def exec_cmd(cmd):
>         if isinstance(cmd, str):
>             cmd = cmd.split(' ')
>         ...
>
> The result is one of the commands in the list consists of a single tab character.
>  When that is passed to the compiler, the compiler does not like it at all.
2022-05-17 10:53:35 +02:00
Mikolaj Izdebski
f8b207df3b Add java_arches macro
See https://fedoraproject.org/wiki/Changes/Drop_i686_JDKs
2022-05-10 21:19:46 +02:00
Timm Bäder
c5a97aad73 brp-compile-lto-elf: Avoid a tmpdir
The mkdir -p was unused as far as I can see. The tmpdir was unnecessary,
since we can just pass -x to clang.
2022-04-23 00:17:32 +00:00
Timm Bäder
d9c7e4eef8 Parallelize llvm-compile-lto-elf 2022-04-23 00:17:32 +00:00
Tom Stellard
200350d957 tests/no-new-dependencies: Add /bin/sh to requires.txt
There appears to be new rpm behavior which adds

Requires(interp): /bin/sh

to this package, so we need to account for this in requires.txt.
We already have /usr/bin/sh in requires.txt, so this is not a
new dependency.
2022-04-20 16:50:13 +00:00
Tom Stellard
0e07c90567 Add -fno-openmp-implicit-rpath when building with clang
This prevents clang from adding RUNPATH for libomp.so to binaries built
with -fopenmp.

https://fedoraproject.org/wiki/Changes/Broken_RPATH_will_fail_rpmbuild
2022-04-19 16:30:13 +00:00
Nick Clifton
0478199b74 Add support for comparing gcc-built and annobin-built plugins. 2022-04-13 11:20:04 +01:00
Timm Bäder
ccc728db6d Add %__brp_remove_la_files to __os_install_post 2022-02-21 09:19:27 +01:00
Florian Weimer
00cb14aeb4 ppc64le: Switch baseline to POWER9 on ELN (ELN issue 78) 2022-02-10 16:35:07 +01:00
Florian Weimer
04be20e64b s390x: Switch baseline to z14 on ELN (ELN issue 79) 2022-02-10 12:08:15 +01:00
Robert-André Mauchin
31ad743a45 Add package note generation to check preamble Fix: rhbz#2043977
Packages which do not have %%build section but do also
compile and link test programs in %%check would fail because
no package note would have been generated.
2022-01-23 11:11:02 +01:00
Zbigniew Jędrzejewski-Szmek
3a30baf034 Bump version and add changelog
With some packages using rpmautospec, it is just so easy to forget…
2022-01-21 18:21:04 +01:00
Zbigniew Jędrzejewski-Szmek
ce70218eed Move package note generation to build preamble
We would try to regenerate the file whenever set_build_flags was used.
For packages which call %configure multiple times this would mean a
few times during build, and also in the build and check
preambles. Let's just simplify this and call it only in the build preamble.

https://src.fedoraproject.org/rpms/package-notes/pull-request/1
changes %_generate_package_note_file to be unconditional. This means we'll
always rewrite the file and will not use a stale version. (But the two
fixes are independent, even though they make the most sense together.)
2022-01-20 22:04:59 +01:00
Zbigniew Jędrzejewski-Szmek
30e7d26cb4 Do ELF package notes also on ELN
I assume that this is the right conditional, and RHEL has a different
version of this package.

For https://bugzilla.redhat.com/show_bug.cgi?id=2043166.
2022-01-20 22:04:59 +01:00
Zbigniew Jędrzejewski-Szmek
68d400e374 docs: add more quoting
Also some minor grammar fixups and "s/link editor/linker/" when
talking about ld.
2022-01-20 22:04:59 +01:00
Zbigniew Jędrzejewski-Szmek
38fc865990 ELF notes: rework the description of disabling
I changed the definitions in package-notes to not do anything if
%_package_note_file is undefined. The other macros won't work if it is
not defined anyway, so this is quite natural. With this, undefining
%_package_note_file becomes the most comprehensive mechanism to disable
the feature. (Undefining %_package_note_flags still works so backwards
compat is preserved.)

The new mechanism will work once
https://src.fedoraproject.org/rpms/package-notes/pull-request/1 is merged.
But I don't think it is necessary to add a version requirement here, since
we're only providing the docs here.
2022-01-20 22:03:18 +01:00
Miro Hrončok
a87ba4ab1c Fix %set_build_flags when %_generate_package_note_file is not defined 2022-01-20 19:24:09 +01:00
Miro Hrončok
357f950c28 Remove package ELF note from the extension LDFLAGS
Related: https://bugzilla.redhat.com/2043092
2022-01-20 19:18:33 +01:00
Zbigniew Jędrzejewski-Szmek
57edf0cad7 Inject linker script to generate package notes
https://fedoraproject.org/wiki/Changes/Package_information_on_ELF_objects
Macros are used only if defined. Definitions are provided in the
package-notes-srpm-macros, which is now Required (on Fedora).
2022-01-17 09:20:00 +01:00
Tom Stellard
9183c1c8d4 Call %set_build_flags before %build, %check, and %install stages
https://fedoraproject.org/wiki/Changes/SetBuildFlagsBuildCheck
2022-01-14 20:57:22 +00:00
Zbigniew Jędrzejewski-Szmek
bc87a0d123 test/gcc-fedora-flags: modernize quoting 2022-01-13 14:05:59 +01:00
Zbigniew Jędrzejewski-Szmek
0732587e7b Change %define to %global
The packaging guidelines say that %global should is preferred.
2022-01-13 14:05:59 +01:00
Zbigniew Jędrzejewski-Szmek
1aa0c42cd3 buildflags: use consistent indentation and other minor fixes 2022-01-13 14:05:59 +01:00
Tom Stellard
95f28bd10b Add -Wl,--build-id=sha1 to the default LDFLAGS
This is already the default for ld.bfd, so this is effectively a no-op
for most packages.  However, lld defaults different build-id algorithm
that the RPM build process does not support, so it needs this flag.

This flag can be overriden by setting the %_build_id_flags macro,
which packages could do if they wanted to use a more secure build-id
algorithm.
2021-12-15 01:24:25 +00:00
Miro Hrončok
faf5c36887 brp-mangle-shebangs: also mangle shebangs of JavaScript executables
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1998924

Unfortunately, the MIME type of JavaScript executables is not text/... but
application/javascript. See RFC 4329.

After considering various approaches to fix this problem, including:

 1) limiting the number of characters `file` reads
 2) using `eu-elfclassify` instead of `file`

This seems like the most sensible approach to fix this one particular problem.
If more instances are found problematic in the future, we'll keep adding the
MIME types.

See the linked bugzilla, the eu-elfclassify pull request [1],
and the devel mailing list thread [2] for details about this problem and
the considered solutions.

[1]: https://src.fedoraproject.org/rpms/redhat-rpm-config/pull-request/145
[2]: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/K3QCBUXYR6ZA34I777X6F2RYJKKECJLM/
2021-12-08 15:19:35 +00:00
Florian Weimer
d1702bd08e buildflags.md: Fix formatting issue in %build_fflags documentation 2021-12-07 21:25:40 +01:00