blob: b2437a872350db4c84cb17dca04b7edc688815f5 [file] [log] [blame]
Patrick Williamsd8c66bc2016-06-20 12:57:21 -05001From e8bae261615e19ff8a28683765c9539cfb22a086 Mon Sep 17 00:00:00 2001
2From: Joe Slater <jslater@windriver.com>
3Date: Thu, 17 Jul 2014 18:14:54 -0700
4Subject: [PATCH 1/9] rpm: compile rpmqv.c instead of rpmqv.cc
Patrick Williamsc124f4f2015-09-15 14:41:29 -05005
6Some versions of gcc, 4.4.5 for example, will put a reference to __gxx_personality_v0
7into rpm.o and rpmbuild.o. This means we must link with g++, and the Makefile we
8generate does not.
9
10So, go back to using rpmqv.c (which is currently identical to rpmqv.cc).
11
12Upstream-Status: Inappropriate [other]
13
14 When linking with g++ is really necessary, the upstream package will do that.
15
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050016Also instead of symlinking files in two places, which can and does race in
17parallel builds, simply refer to the file's full location [RB]
Patrick Williamsc124f4f2015-09-15 14:41:29 -050018
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050019Signed-off-by: Joe Slater <joe.slater@windriver.com>
20Signed-off-by: Ross Burton <ross.burton@intel.com>
21
22---
23 Makefile.am | 6 ++----
24 1 file changed, 2 insertions(+), 4 deletions(-)
25
26diff --git a/Makefile.am b/Makefile.am
27index 1dade0a..55f8669 100644
Patrick Williamsc124f4f2015-09-15 14:41:29 -050028--- a/Makefile.am
29+++ b/Makefile.am
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050030@@ -201,15 +201,13 @@ rpm_SOURCES = build.c
Patrick Williamsc124f4f2015-09-15 14:41:29 -050031 rpm_LDFLAGS = @LDFLAGS_STATIC@ $(LDFLAGS)
32 rpm_LDADD = rpm.o $(myLDADD)
33 rpm.o: $(top_srcdir)/rpmqv.c
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050034- ln -sf $< rpmqv.cc
35- $(COMPILE) -DIAM_RPMBT -DIAM_RPMDB -DIAM_RPMEIU -DIAM_RPMK -DIAM_RPMQV -o $@ -c rpmqv.cc
36+ $(COMPILE) -DIAM_RPMBT -DIAM_RPMDB -DIAM_RPMEIU -DIAM_RPMK -DIAM_RPMQV -o $@ -c $^
Patrick Williamsc124f4f2015-09-15 14:41:29 -050037
38 rpmbuild_SOURCES = build.c
39 rpmbuild_LDFLAGS = @LDFLAGS_STATIC@ $(LDFLAGS)
40 rpmbuild_LDADD = rpmbuild.o $(myLDADD)
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050041 rpmbuild.o: $(top_srcdir)/rpmqv.c
42- ln -sf $< rpmqv.cc
43- $(COMPILE) -DIAM_RPMBT -o $@ -c rpmqv.cc
44+ $(COMPILE) -DIAM_RPMBT -o $@ -c $^
Patrick Williamsc124f4f2015-09-15 14:41:29 -050045
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050046 .syntastic_c_config: Makefile
47 @echo $(COMPILE) | tr ' ' '\n' | sed -e '1d' > $@
48--
492.7.0
50