Make the kconfig-style build work in mingw:
* use relative paths in ldscript.ld and crt0_includes.h * avoid use of dd(1) in xcompile * build libregex for kconfig, if necessary * work around missing utsname on win32 * unlink targets before rename on win32 * implement (crude) mkstemp for win32 * avoid open/read/close, use fopen/fread/fclose instead * don't free certain data structures in romcc on win32 to avoid crashes (likely use-after-free()) * handle "\CRLF" and win32 style absolute paths (X:/ or X:\) in romcc * make lzma (part of cbfstool) build on XP * implement ntohl/htonl on win32 * handle CRLF in awk script * set larger stack for romcc on win32 Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de> Acked-by: Peter Stuge <peter@stuge.se> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4952 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
13
Makefile
13
Makefile
@@ -311,12 +311,19 @@ update:
|
||||
include util/kconfig/Makefile
|
||||
|
||||
$(obj)/ldoptions: $(obj)/config.h
|
||||
# cat $(obj)/config.h | grep -v \" |grep -v AUTOCONF_INCLUDED | grep \#define | sed s/\#define\ // | sed s/\ /\ =\ / | sed 's/$$/;/' > $(obj)/ldoptions
|
||||
awk '/^#define ([^"])* ([^"])*$$/ {print $$2 " = " $$3 ";";}' $< > $@
|
||||
awk '/^#define ([^"])* ([^"])*$$/ {gsub("\\r","",$$3); print $$2 " = " $$3 ";";}' $< > $@
|
||||
|
||||
_OS=$(shell uname -s |cut -c-7)
|
||||
STACK=
|
||||
ifeq ($(_OS),MINGW32)
|
||||
STACK=-Wl,--stack,16384000
|
||||
endif
|
||||
ifeq ($(_OS),CYGWIN_)
|
||||
STACK=-Wl,--stack,16384000
|
||||
endif
|
||||
$(obj)/romcc: $(top)/util/romcc/romcc.c
|
||||
@printf " HOSTCC $(subst $(obj)/,,$(@)) (this may take a while)\n"
|
||||
$(HOSTCC) -g -O2 -Wall -o $@ $<
|
||||
$(HOSTCC) -g -O2 $(STACK) -Wall -o $@ $<
|
||||
|
||||
.PHONY: $(PHONY) prepare prepare2 clean distclean doxygen doxy coreboot
|
||||
|
||||
|
Reference in New Issue
Block a user