dash-0.5.7-no-config.h-for-helpers.patch 1.4 KB

1234567891011121314151617181920212223242526272829303132333435
  1. [PATCH] Don't include config.h when building helpers using the native compiler
  2. config.h contains settings for the cross compiler (most importantly
  3. 32/64bit versions of functions), so don't include it when calling the
  4. native compiler to build the helpers.
  5. Otherwise we get build errors like:
  6. /usr/bin/gcc -include ../config.h -DBSD=1 -DSHELL -DIFS_BROKEN -g -O2 -Wall -o mkinit mkinit.c
  7. In file included from /usr/include/sys/stat.h:107,
  8. from /usr/include/fcntl.h:38,
  9. from mkinit.c:50:
  10. /usr/include/bits/stat.h:117: error: redefinition of ‘struct stat’
  11. In file included from /usr/include/fcntl.h:38,
  12. from mkinit.c:50:
  13. /usr/include/sys/stat.h:504: error: redefinition of ‘stat’
  14. /usr/include/sys/stat.h:455: note: previous definition of ‘stat’ was here
  15. Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
  16. ---
  17. src/Makefile.in | 1 -
  18. 1 file changed, 1 deletion(-)
  19. Index: dash-0.5.5.1/src/Makefile.in
  20. ===================================================================
  21. --- dash-0.5.5.1.orig/src/Makefile.in
  22. +++ dash-0.5.5.1/src/Makefile.in
  23. @@ -165,7 +165,6 @@ COMMON_CPPFLAGS = \
  24. AM_CFLAGS = $(COMMON_CFLAGS)
  25. AM_CPPFLAGS = $(COMMON_CPPFLAGS)
  26. AM_CFLAGS_FOR_BUILD = -g -O2 $(COMMON_CFLAGS)
  27. -AM_CPPFLAGS_FOR_BUILD = $(COMMON_CPPFLAGS)
  28. COMPILE_FOR_BUILD = \
  29. $(CC_FOR_BUILD) $(AM_CPPFLAGS_FOR_BUILD) $(CPPFLAGS_FOR_BUILD) \
  30. $(AM_CFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD)