Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame^] | 1 | do not override compiler and do not strip |
| 2 | |
| 3 | The default makefile sets the compiler to g++ or gcc. This leads to a wrong architecture when cross-compiling. |
| 4 | Remove the hardcoded compiler and just append the flags to CXX and CC. |
| 5 | |
| 6 | Upstream-Status: Pending |
| 7 | Signed-off-by: Raphael Freudiger <raphael.freudiger@siemens.com> |
| 8 | Reviewed-By: Pascal Bach <pascal.bach@siemens.com> |
| 9 | |
| 10 | Index: p7zip_9.20.1/makefile.machine |
| 11 | ===================================================================== |
| 12 | --- p7zip_9.20.1/makefile.machine 2011-03-13 12:54:57.000000000 +0100 |
| 13 | +++ p7zip_9.20.1/makefile.machine 2015-02-03 08:39:44.427696944 +0100 |
| 14 | @@ -4,14 +4,14 @@ |
| 15 | |
| 16 | OPTFLAGS=-O |
| 17 | |
| 18 | -ALLFLAGS=${OPTFLAGS} -pipe -s \ |
| 19 | +ALLFLAGS=${OPTFLAGS} -pipe \ |
| 20 | -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \ |
| 21 | -DNDEBUG -D_REENTRANT -DENV_UNIX \ |
| 22 | -D_7ZIP_LARGE_PAGES \ |
| 23 | $(LOCAL_FLAGS) |
| 24 | |
| 25 | -CXX=g++ $(ALLFLAGS) |
| 26 | -CC=gcc $(ALLFLAGS) |
| 27 | +CXX+=$(ALLFLAGS) |
| 28 | +CC+=$(ALLFLAGS) |
| 29 | CC_SHARED=-fPIC |
| 30 | LINK_SHARED=-fPIC -shared |
| 31 | |