!13 [sync] PR-9: slove the problem of security scanning of options
From: @openeuler-sync-bot Reviewed-by: @orange-snn Signed-off-by: @orange-snn
This commit is contained in:
commit
4cace7569c
80
backport-add-RPMOPTFLAGS-to-CFLAGS-for-some-stuff.patch
Normal file
80
backport-add-RPMOPTFLAGS-to-CFLAGS-for-some-stuff.patch
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
From 5c24d725d5a5f50f0544fbcc544f08a3f9e90e5d Mon Sep 17 00:00:00 2001
|
||||||
|
From: Peter Jones <pjones@redhat.com>
|
||||||
|
Date: Thu, 8 Aug 2019 05:41:36 -0400
|
||||||
|
Subject: [PATCH] Add 'RPMOPTFLAGS' to CFLAGS for some stuff.
|
||||||
|
|
||||||
|
reason:Add 'RPMOPTFLAGS' to CFLAGS for some stuff
|
||||||
|
|
||||||
|
Conflict:NA
|
||||||
|
Reference:https://github.com/mer-tools/syslinux/blob/tar_git/rpm/0004-Add-RPMOPTFLAGS-to-CFLAGS-for-some-stuff.patch
|
||||||
|
---
|
||||||
|
extlinux/Makefile | 4 ++--
|
||||||
|
linux/Makefile | 4 ++--
|
||||||
|
mtools/Makefile | 4 ++--
|
||||||
|
utils/Makefile | 4 ++--
|
||||||
|
4 files changed, 8 insertions(+), 8 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/extlinux/Makefile b/extlinux/Makefile
|
||||||
|
index 1721ee54aff..d504e23133e 100644
|
||||||
|
--- a/extlinux/Makefile
|
||||||
|
+++ b/extlinux/Makefile
|
||||||
|
@@ -18,9 +18,9 @@ include $(MAKEDIR)/syslinux.mk
|
||||||
|
|
||||||
|
OPTFLAGS = -g -Os
|
||||||
|
INCLUDES = -I$(SRC) -I$(objdir) -I$(SRC)/../libinstaller
|
||||||
|
-CFLAGS = $(GCCWARN) -Wno-sign-compare -D_FILE_OFFSET_BITS=64 \
|
||||||
|
+CFLAGS = $(RPMCFLAGS) $(GCCWARN) -Wno-sign-compare -D_FILE_OFFSET_BITS=64 \
|
||||||
|
$(OPTFLAGS) $(INCLUDES)
|
||||||
|
-LDFLAGS =
|
||||||
|
+LDFLAGS = $(RPMLDFLAGS)
|
||||||
|
|
||||||
|
SRCS = main.c \
|
||||||
|
mountinfo.c \
|
||||||
|
diff --git a/linux/Makefile b/linux/Makefile
|
||||||
|
index 5a49d813de1..9fed68d02c6 100644
|
||||||
|
--- a/linux/Makefile
|
||||||
|
+++ b/linux/Makefile
|
||||||
|
@@ -18,8 +18,8 @@ include $(MAKEDIR)/syslinux.mk
|
||||||
|
|
||||||
|
OPTFLAGS = -g -Os
|
||||||
|
INCLUDES = -I$(SRC) -I$(objdir) -I$(SRC)/../libinstaller
|
||||||
|
-CFLAGS = $(GCCWARN) -D_FILE_OFFSET_BITS=64 $(OPTFLAGS) $(INCLUDES)
|
||||||
|
-LDFLAGS =
|
||||||
|
+CFLAGS = $(RPMCFLAGS) $(GCCWARN) -D_FILE_OFFSET_BITS=64 $(OPTFLAGS) $(INCLUDES)
|
||||||
|
+LDFLAGS = $(RPMLDFLAGS)
|
||||||
|
|
||||||
|
SRCS = syslinux.c \
|
||||||
|
../libinstaller/syslxopt.c \
|
||||||
|
diff --git a/mtools/Makefile b/mtools/Makefile
|
||||||
|
index 632b185ba2f..b6e5ebdba6b 100755
|
||||||
|
--- a/mtools/Makefile
|
||||||
|
+++ b/mtools/Makefile
|
||||||
|
@@ -2,8 +2,8 @@ include $(MAKEDIR)/syslinux.mk
|
||||||
|
|
||||||
|
OPTFLAGS = -g -Os
|
||||||
|
INCLUDES = -I$(SRC) -I$(objdir) -I$(SRC)/../libfat -I$(SRC)/../libinstaller
|
||||||
|
-CFLAGS = $(GCCWARN) -D_FILE_OFFSET_BITS=64 $(OPTFLAGS) $(INCLUDES)
|
||||||
|
-LDFLAGS =
|
||||||
|
+CFLAGS = $(RPMCFLAGS) $(GCCWARN) -D_FILE_OFFSET_BITS=64 $(OPTFLAGS) $(INCLUDES)
|
||||||
|
+LDFLAGS = $(RPMLDFLAGS)
|
||||||
|
|
||||||
|
SRCS = syslinux.c \
|
||||||
|
../libinstaller/fs.c \
|
||||||
|
diff --git a/utils/Makefile b/utils/Makefile
|
||||||
|
index dfe625902ce..b4962353f20 100644
|
||||||
|
--- a/utils/Makefile
|
||||||
|
+++ b/utils/Makefile
|
||||||
|
@@ -17,8 +17,8 @@
|
||||||
|
VPATH = $(SRC)
|
||||||
|
include $(MAKEDIR)/syslinux.mk
|
||||||
|
|
||||||
|
-CFLAGS = $(GCCWARN) -Os -fomit-frame-pointer -D_FILE_OFFSET_BITS=64 -I$(SRC)
|
||||||
|
-LDFLAGS = -O2
|
||||||
|
+CFLAGS = $(RPMCFLAGS) $(GCCWARN) -Os -fomit-frame-pointer -D_FILE_OFFSET_BITS=64 -I$(SRC)
|
||||||
|
+LDFLAGS = $(RPMLDFLAGS) -O2
|
||||||
|
|
||||||
|
C_TARGETS = isohybrid gethostip memdiskfind
|
||||||
|
SCRIPT_TARGETS = mkdiskimage
|
||||||
|
--
|
||||||
|
2.21.0
|
||||||
|
|
||||||
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Name: syslinux
|
Name: syslinux
|
||||||
Version: 6.04
|
Version: 6.04
|
||||||
Release: 6
|
Release: 7
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
Summary: The Syslinux boot loader collection
|
Summary: The Syslinux boot loader collection
|
||||||
URL: http://syslinux.zytor.com/wiki/index.php/The_Syslinux_Project
|
URL: http://syslinux.zytor.com/wiki/index.php/The_Syslinux_Project
|
||||||
@ -24,6 +24,7 @@ Patch0002: 0002-ext4-64bit-feature.patch
|
|||||||
Patch0003: 0003-include-sysmacros-h.patch
|
Patch0003: 0003-include-sysmacros-h.patch
|
||||||
|
|
||||||
Patch0004: backport-replace-builtin-strlen-that-appears-to-get-optimized.patch
|
Patch0004: backport-replace-builtin-strlen-that-appears-to-get-optimized.patch
|
||||||
|
Patch0005: backport-add-RPMOPTFLAGS-to-CFLAGS-for-some-stuff.patch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
The Syslinux Project covers lightweight bootloaders for MS-DOS FAT filesystems (SYSLINUX),
|
The Syslinux Project covers lightweight bootloaders for MS-DOS FAT filesystems (SYSLINUX),
|
||||||
@ -96,8 +97,8 @@ Help document for the syslinux package.
|
|||||||
%autosetup -n syslinux-6.04-pre1 -p1
|
%autosetup -n syslinux-6.04-pre1 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
make bios clean all
|
make RPMCFLAGS='%{optflags}' RPMLDFLAGS='%{build_ldflags}' bios clean all
|
||||||
make efi64 clean all
|
make RPMCFLAGS='%{optflags}' RPMLDFLAGS='%{build_ldflags}' efi64 clean all
|
||||||
|
|
||||||
%install
|
%install
|
||||||
rm -rf %{buildroot}
|
rm -rf %{buildroot}
|
||||||
@ -166,6 +167,9 @@ fi
|
|||||||
%{_datadir}/doc/syslinux/sample/sample.msg
|
%{_datadir}/doc/syslinux/sample/sample.msg
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sat Mar 20 2021 hanhui<hanhui15@huawei.com> - 6.04-7
|
||||||
|
- slove the problem of security scanning of options
|
||||||
|
|
||||||
* Sun Feb 7 2021 jinzhimin<jinzhimin2@huawei.com> - 6.04-6
|
* Sun Feb 7 2021 jinzhimin<jinzhimin2@huawei.com> - 6.04-6
|
||||||
- add patch to replace builtin strlen
|
- add patch to replace builtin strlen
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user