fixed bz#1552653 - ppc64-diag: Missing Fedora build flags injection

This commit is contained in:
Than Ngo 2018-03-07 17:04:57 +01:00
parent e186248981
commit fcf36e62d5
2 changed files with 134 additions and 2 deletions

127
ppc64-diag-optflags.patch Normal file
View File

@ -0,0 +1,127 @@
diff -up ppc64-diag-2.7.1/Makefile.optflags ppc64-diag-2.7.1/Makefile
--- ppc64-diag-2.7.1/Makefile.optflags 2016-05-09 08:26:55.000000000 +0200
+++ ppc64-diag-2.7.1/Makefile 2018-03-07 16:57:02.947694729 +0100
@@ -4,7 +4,6 @@
include rules.mk
-.SILENT:
BUILD_DIR=$(CURDIR)
SUBDIRS = common rtas_errd diags scripts ela lpd opal_errd opal-dump-parse
@@ -16,19 +15,19 @@ TARBALL_FILES += $(DOXYGEN_CFG)
all:
@echo "Building common files..."
- @$(MAKE) -C common
+ $(MAKE) -C common
@echo "Building rtas_errd files..."
- @$(MAKE) -C rtas_errd
+ $(MAKE) -C rtas_errd
@echo "Building diags files..."
- @$(MAKE) -C diags
+ $(MAKE) -C diags
@echo "Building ela files..."
- @$(MAKE) -C ela
+ $(MAKE) -C ela
@echo "Building lpd files..."
- @$(MAKE) -C lpd
+ $(MAKE) -C lpd
@echo "Building opal_errd files..."
- @$(MAKE) -C opal_errd
+ $(MAKE) -C opal_errd
@echo "Building opal-dump-parse files..."
- @$(MAKE) -C opal-dump-parse
+ $(MAKE) -C opal-dump-parse
install: all
diff -up ppc64-diag-2.7.1/common/tests/Makefile.optflags ppc64-diag-2.7.1/common/tests/Makefile
--- ppc64-diag-2.7.1/common/tests/Makefile.optflags 2016-05-09 08:26:55.000000000 +0200
+++ ppc64-diag-2.7.1/common/tests/Makefile 2018-03-07 16:57:02.967695095 +0100
@@ -3,7 +3,6 @@
#
CC = gcc
-CFLAGS = -g -Wall
INCLUDE = -I../
PROGS = spopen
diff -up ppc64-diag-2.7.1/diags/Makefile.optflags ppc64-diag-2.7.1/diags/Makefile
--- ppc64-diag-2.7.1/diags/Makefile.optflags 2016-05-09 08:26:55.000000000 +0200
+++ ppc64-diag-2.7.1/diags/Makefile 2018-03-07 16:57:02.937694546 +0100
@@ -23,12 +23,10 @@ all: $(PROGS)
@$(foreach d,$(SUBDIRS), $(MAKE) -C $d;)
diag_encl: $(DIAG_ENCL_OBJS)
- @echo "LD $(WORK_DIR)/$@"
- @$(CC) $(CFLAGS) $(INCLUDE) $(COMMON_UTILS_OBJ) -o $@ $^ $(DIAG_ENCL_LIBS)
+ $(CC) $(CFLAGS) $(INCLUDE) $(COMMON_UTILS_OBJ) -o $@ $^ $(DIAG_ENCL_LIBS)
encl_led: $(ENCL_LED_OBJS)
- @echo "LD $(WORK_DIR)/$@"
- @$(CC) $(CFLAGS) $(INCLUDE) $(COMMON_UTILS_OBJ) -o $@ $^
+ $(CC) $(CFLAGS) $(INCLUDE) $(COMMON_UTILS_OBJ) -o $@ $^
diag_encl.o: encl_util.h diag_encl.h
diff -up ppc64-diag-2.7.1/rtas_errd/Makefile.optflags ppc64-diag-2.7.1/rtas_errd/Makefile
--- ppc64-diag-2.7.1/rtas_errd/Makefile.optflags 2018-03-07 16:57:02.937694546 +0100
+++ ppc64-diag-2.7.1/rtas_errd/Makefile 2018-03-07 16:57:02.947694729 +0100
@@ -26,16 +26,13 @@ DOXYGEN_CFG = doxygen.config
all: $(CMDS) $(SCRIPTS)
rtas_errd: $(RTAS_ERRD_OBJS) $(COMMON_UTILS_OBJ)
- @echo "LD $(WORK_DIR)/$@"
$(CC) $(CFLAGS) -o $@ $^ $(RTAS_ERRD_LIBS)
convert_dt_node_props: $(DT_NODE_OBJS)
- @echo "LD $(WORK_DIR)/$@"
- @$(CC) $(CFLAGS) -o $@ $^
+ $(CC) $(CFLAGS) -o $@ $^
extract_platdump: $(EXTRACT_PLATDUMP_OBJS)
- @echo "LD $(WORK_DIR)/$@"
- @$(CC) $(CFLAGS) -o $@ $^ $(EXTRACT_PLATDUMP_LIBS)
+ $(CC) $(CFLAGS) -o $@ $^ $(EXTRACT_PLATDUMP_LIBS)
install: all
@$(call install_sbin,$(CMDS),$(DESTDIR))
diff -up ppc64-diag-2.7.1/rules.mk.optflags ppc64-diag-2.7.1/rules.mk
--- ppc64-diag-2.7.1/rules.mk.optflags 2016-05-09 08:26:55.000000000 +0200
+++ ppc64-diag-2.7.1/rules.mk 2018-03-07 16:58:40.219475082 +0100
@@ -85,11 +85,7 @@ BUILD_TARBALL = \
# Current build directory
WORK_DIR = $(patsubst /%,%,$(subst $(ROOT_DIR),,$(PWD)))
-# You should always build with -Wall
-CFLAGS += -Wall
-
-# Uncomment this for debug builds
-CFLAGS += -g -DDEBUG
+CC = gcc
# Build with common directory included
CFLAGS += -I$(COMMON_DIR)
@@ -100,12 +96,6 @@ CFLAGS += -I $(INC_DIR)/ncurses
# Build with version string
AM_CFLAGS = -DVERSION='"$(VERSION)"'
-# You should always build with -Wall
-CXXFLAGS += -Wall
-
-# Uncomment this for debug builds
-CXXFLAGS += -g -DDEBUG
-
# Build with common directory included
CXXFLAGS += -I$(COMMON_DIR)
@@ -211,7 +201,6 @@ CLEAN = @echo ""
# Default target for building object files
%.o: %.c
- @echo "CC $(WORK_DIR)/$@"
- @$(CC) -c $(AM_CFLAGS) $(CFLAGS) $<
+ $(CC) -c $(AM_CFLAGS) $(CFLAGS) $<

View File

@ -1,6 +1,6 @@
Name: ppc64-diag
Version: 2.7.1
Release: 5%{?dist}
Release: 6%{?dist}
Summary: PowerLinux Platform Diagnostics
URL: http://sourceforge.net/projects/linux-diag/files/ppc64-diag/
Group: System Environment/Base
@ -24,6 +24,7 @@ Patch2: ppc64-diag-scriptlocation.patch
Patch3: ppc64-diag-unusedvar.patch
Patch4: ppc64-diag-lpdscriptloc.patch
Patch5: ppc64-diag-prrnscriptloc.patch
Patch6: ppc64-diag-optflags.patch
%description
This package contains various diagnostic tools for PowerLinux.
@ -46,9 +47,10 @@ administrators or connected service frameworks.
%patch3 -p1 -b .unusevar
%patch4 -p1 -b .lpdscriptloc
%patch5 -p1 -b .prrnscriptloc
%patch6 -p1 -b .optflags
%build
make %{?_smp_mflags} V=1
LDFLAGS="%{__global_ldflags}" CFLAGS="%{optflags}" CXXFLAGS="%{optflags}" make %{?_smp_mflags} V=1
%install
make install DESTDIR=$RPM_BUILD_ROOT
@ -127,6 +129,9 @@ fi
%changelog
* Wed Mar 07 2018 Than Ngo <than@redhat.com> - - 2.7.1-6
- fixed bz#1552653 - ppc64-diag: Missing Fedora build flags injection
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild