Build in C89 mode (#2187168)
Related to: <https://fedoraproject.org/wiki/Changes/PortingToModernC> <https://fedoraproject.org/wiki/Toolchain/PortingToModernC>
This commit is contained in:
parent
5ff16c55e1
commit
b94f01fdd4
26
star-configure-c99.patch
Normal file
26
star-configure-c99.patch
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
Port the GNU/Linux parts of config.guess to C99 because the script is
|
||||||
|
invoked without CFLAGS.
|
||||||
|
|
||||||
|
diff --git a/autoconf/config.guess b/autoconf/config.guess
|
||||||
|
index 41249c1295106577..bf567065edc492a6 100755
|
||||||
|
--- a/autoconf/config.guess
|
||||||
|
+++ b/autoconf/config.guess
|
||||||
|
@@ -686,7 +686,8 @@ EOF
|
||||||
|
# Determine whether the default compiler is a.out or elf
|
||||||
|
cat >dummy.c <<EOF
|
||||||
|
#include <features.h>
|
||||||
|
-main(argc, argv)
|
||||||
|
+#include <stdio.h>
|
||||||
|
+int main(argc, argv)
|
||||||
|
int argc;
|
||||||
|
char *argv[];
|
||||||
|
{
|
||||||
|
@@ -900,7 +901,7 @@ cat >dummy.c <<EOF
|
||||||
|
# include <sys/types.h>
|
||||||
|
# include <sys/utsname.h>
|
||||||
|
#endif
|
||||||
|
-main ()
|
||||||
|
+int main (void)
|
||||||
|
{
|
||||||
|
#if defined (sony)
|
||||||
|
#if defined (MIPSEB)
|
12
star.spec
12
star.spec
@ -3,7 +3,7 @@
|
|||||||
Summary: An archiving tool with ACL support
|
Summary: An archiving tool with ACL support
|
||||||
Name: star
|
Name: star
|
||||||
Version: 1.6
|
Version: 1.6
|
||||||
Release: 8%{?dist}
|
Release: 9%{?dist}
|
||||||
License: CDDL
|
License: CDDL
|
||||||
URL: http://freecode.com/projects/star
|
URL: http://freecode.com/projects/star
|
||||||
Source: https://downloads.sourceforge.net/s-tar/%{name}-%{version}.tar.bz2
|
Source: https://downloads.sourceforge.net/s-tar/%{name}-%{version}.tar.bz2
|
||||||
@ -27,6 +27,7 @@ Patch4: star-1.5.2-rmt-rh-access.patch
|
|||||||
# ~> downstream
|
# ~> downstream
|
||||||
# ~> related to #968980
|
# ~> related to #968980
|
||||||
Patch5: star-1.5.2-use-ssh-by-default.patch
|
Patch5: star-1.5.2-use-ssh-by-default.patch
|
||||||
|
Patch6: star-configure-c99.patch
|
||||||
|
|
||||||
BuildRequires: make
|
BuildRequires: make
|
||||||
BuildRequires: libattr-devel libacl-devel libtool libselinux-devel
|
BuildRequires: libattr-devel libacl-devel libtool libselinux-devel
|
||||||
@ -100,7 +101,9 @@ done
|
|||||||
%build
|
%build
|
||||||
# This is config/work-around for atypical build system. Variables used are
|
# This is config/work-around for atypical build system. Variables used are
|
||||||
# docummented makefiles.5. GMAKE_NOWARN silences irritating warnings in
|
# docummented makefiles.5. GMAKE_NOWARN silences irritating warnings in
|
||||||
# GNU/Linux ecosystem.
|
# GNU/Linux ecosystem. Build in C89 mode (-std=gnu89) because these
|
||||||
|
# many of these warnings are actually errors as later C standards are
|
||||||
|
# concerned.
|
||||||
%global make_flags GMAKE_NOWARN=true \\\
|
%global make_flags GMAKE_NOWARN=true \\\
|
||||||
RUNPATH= \\\
|
RUNPATH= \\\
|
||||||
LDPATH= \\\
|
LDPATH= \\\
|
||||||
@ -109,7 +112,7 @@ done
|
|||||||
INS_BASE=$RPM_BUILD_ROOT%{_prefix} \\\
|
INS_BASE=$RPM_BUILD_ROOT%{_prefix} \\\
|
||||||
INS_RBASE=$RPM_BUILD_ROOT \\\
|
INS_RBASE=$RPM_BUILD_ROOT \\\
|
||||||
INSTALL='sh $(SRCROOT)/conf/install-sh -c -m $(INSMODEINS)' \\\
|
INSTALL='sh $(SRCROOT)/conf/install-sh -c -m $(INSMODEINS)' \\\
|
||||||
COPTX="$RPM_OPT_FLAGS -DTRY_EXT2_FS" \\\
|
COPTX="%build_cflags -std=gnu89 -DTRY_EXT2_FS" \\\
|
||||||
LDOPTX="$RPM_LD_FLAGS" \\\
|
LDOPTX="$RPM_LD_FLAGS" \\\
|
||||||
DEFCCOM=gcc
|
DEFCCOM=gcc
|
||||||
|
|
||||||
@ -198,6 +201,9 @@ fi
|
|||||||
%{_sysconfdir}/rmt
|
%{_sysconfdir}/rmt
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Apr 17 2023 Florian Weimer <fweimer@redhat.com> - 1.6-9
|
||||||
|
- Build in C89 mode (#2187168)
|
||||||
|
|
||||||
* Sat Jan 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.6-8
|
* Sat Jan 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.6-8
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user