From 26774f2b729d791c9dbf5ba0f7fcf4a59e3795a5 Mon Sep 17 00:00:00 2001 From: Patrick Georgi Date: Sat, 21 Nov 2009 19:54:02 +0000 Subject: 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 Acked-by: Peter Stuge git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4952 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- util/xcompile/xcompile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'util/xcompile') diff --git a/util/xcompile/xcompile b/util/xcompile/xcompile index 79d4bfe5ad..a8ffa82cc2 100644 --- a/util/xcompile/xcompile +++ b/util/xcompile/xcompile @@ -7,9 +7,9 @@ for make in make gmake gnumake; do done GCCPREFIX=invalid -TMP=`mktemp /tmp/temp.XXXX` +TMP=`mktemp /tmp/temp.XXXX 2>/dev/null || echo /tmp/temp.78gOIUGz` echo "mov %eax, %eax" > ${TMP}.s -printf "\x7fELF" > ${TMP}.compare +printf "\x7fELF\n" > ${TMP}.compare for gccprefixes in `pwd`/util/crossgcc/xgcc/bin/i386-elf- i386-elf- ""; do if which ${gccprefixes}as 2>/dev/null >/dev/null; then printf "" @@ -18,7 +18,7 @@ for gccprefixes in `pwd`/util/crossgcc/xgcc/bin/i386-elf- i386-elf- ""; do fi rm -f ${TMP}.o if ${gccprefixes}as --32 -o ${TMP}.o ${TMP}.s; then - dd bs=4 count=1 if=${TMP}.o > ${TMP}.test 2>/dev/null + cut -c-4 ${TMP}.o > ${TMP}.test 2>/dev/null if cmp ${TMP}.test ${TMP}.compare; then GCCPREFIX=$gccprefixes break -- cgit v1.2.3