do_not_override_compiler_and_do_not_strip.patch 966 B

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