Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 1 | From e8bae261615e19ff8a28683765c9539cfb22a086 Mon Sep 17 00:00:00 2001 |
| 2 | From: Joe Slater <jslater@windriver.com> |
| 3 | Date: Thu, 17 Jul 2014 18:14:54 -0700 |
| 4 | Subject: [PATCH 1/9] rpm: compile rpmqv.c instead of rpmqv.cc |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 5 | |
| 6 | Some versions of gcc, 4.4.5 for example, will put a reference to __gxx_personality_v0 |
| 7 | into rpm.o and rpmbuild.o. This means we must link with g++, and the Makefile we |
| 8 | generate does not. |
| 9 | |
| 10 | So, go back to using rpmqv.c (which is currently identical to rpmqv.cc). |
| 11 | |
| 12 | Upstream-Status: Inappropriate [other] |
| 13 | |
| 14 | When linking with g++ is really necessary, the upstream package will do that. |
| 15 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 16 | Also instead of symlinking files in two places, which can and does race in |
| 17 | parallel builds, simply refer to the file's full location [RB] |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 18 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 19 | Signed-off-by: Joe Slater <joe.slater@windriver.com> |
| 20 | Signed-off-by: Ross Burton <ross.burton@intel.com> |
| 21 | |
| 22 | --- |
| 23 | Makefile.am | 6 ++---- |
| 24 | 1 file changed, 2 insertions(+), 4 deletions(-) |
| 25 | |
| 26 | diff --git a/Makefile.am b/Makefile.am |
| 27 | index 1dade0a..55f8669 100644 |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 28 | --- a/Makefile.am |
| 29 | +++ b/Makefile.am |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 30 | @@ -201,15 +201,13 @@ rpm_SOURCES = build.c |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 31 | rpm_LDFLAGS = @LDFLAGS_STATIC@ $(LDFLAGS) |
| 32 | rpm_LDADD = rpm.o $(myLDADD) |
| 33 | rpm.o: $(top_srcdir)/rpmqv.c |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 34 | - 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 Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 37 | |
| 38 | rpmbuild_SOURCES = build.c |
| 39 | rpmbuild_LDFLAGS = @LDFLAGS_STATIC@ $(LDFLAGS) |
| 40 | rpmbuild_LDADD = rpmbuild.o $(myLDADD) |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 41 | 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 Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 45 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 46 | .syntastic_c_config: Makefile |
| 47 | @echo $(COMPILE) | tr ' ' '\n' | sed -e '1d' > $@ |
| 48 | -- |
| 49 | 2.7.0 |
| 50 | |