diff options
Diffstat (limited to 'util')
-rwxr-xr-x | util/abuild/abuild | 22 | ||||
-rw-r--r-- | util/newconfig/config.g | 2 | ||||
-rw-r--r-- | util/romcc/romcc.c | 6 |
3 files changed, 19 insertions, 11 deletions
diff --git a/util/abuild/abuild b/util/abuild/abuild index f8e8196232..5f6120faa8 100755 --- a/util/abuild/abuild +++ b/util/abuild/abuild @@ -36,7 +36,14 @@ cpus=1 configureonly=0 # One might want to adjust these in case of cross compiling -MAKE="make" +for i in make gmake gnumake nonexistant_make; do + $i --version 2>/dev/null |grep "GNU Make" >/dev/null && break +done +if [ "$i" = "nonexistant_make" ]; then + echo No GNU Make found. + exit 1 +fi +MAKE=$i PYTHON=python # this can be changed to xml by -x @@ -202,10 +209,11 @@ EOF LOGLEVEL2="" fi - if [ "`which lzma`" != "" -a "$PAYLOAD" != /dev/null ]; then - COMPRESSION="option CONFIG_COMPRESSED_PAYLOAD_LZMA=1" - else - COMPRESSION="# no compression" + COMPRESSION="# no compression" + if which lzma >/dev/null 2>/dev/null; then + if [ "$PAYLOAD" != /dev/null ]; then + COMPRESSION="option CONFIG_COMPRESSED_PAYLOAD_LZMA=1" + fi fi cp $TARGET/Config-${VENDOR}_${MAINBOARD}.lb $TARGET/Config-${VENDOR}_${MAINBOARD}.lb.pre @@ -266,7 +274,7 @@ function create_builddir xmlfile $build_dir/config.log xml " </log>" xml "" - tail -n $CONTEXT $build_dir/config.log + tail -n $CONTEXT $build_dir/config.log 2> /dev/null || tail -$CONTEXT $build_dir/config.log return 1 fi } @@ -315,7 +323,7 @@ function compile_target xml " </log>" printf "FAILED after ${duration}s! Log excerpt:\n" - tail -n $CONTEXT make.log + tail -n $CONTEXT make.log 2> /dev/null || tail -$CONTEXT make.log cd $CURR return 1 fi diff --git a/util/newconfig/config.g b/util/newconfig/config.g index f2b8df17a9..b8b8c16e9c 100644 --- a/util/newconfig/config.g +++ b/util/newconfig/config.g @@ -2118,7 +2118,7 @@ def writeimagemakefile(image): file.write("# Function to create an item like -Di586 or -DCONFIG_MAX_CPUS='1' or -Ui686\n") file.write("D_item = $(shell echo '$(if $(subst undefined,,$(origin $1)),\\#define $1$(if $($1), $($1),),\\#undef $1)' >> settings.h)\n\n") file.write("# Compute the value of CPUFLAGS here during make's first pass.\n") - file.write("CPUFLAGS := $(strip $(shell echo '/* autogenerated */' > settings.h)$(foreach _var_,$(VARIABLES),$(call D_item,$(_var_)))-include $(PWD)/settings.h)\n\n") + file.write("CPUFLAGS := $(strip $(shell echo '/* autogenerated */' > settings.h)$(foreach _var_,$(VARIABLES),$(call D_item,$(_var_)))-include $(CURDIR)/settings.h)\n\n") for i in image.getuserdefines(): file.write("%s\n" %i) diff --git a/util/romcc/romcc.c b/util/romcc/romcc.c index bc647fd75b..5ab94274af 100644 --- a/util/romcc/romcc.c +++ b/util/romcc/romcc.c @@ -280,7 +280,7 @@ typedef uint16_t ushort_t; typedef int32_t int_t; typedef uint32_t uint_t; typedef int32_t long_t; -typedef uint32_t ulong_t; +#define ulong_t uint32_t #define SCHAR_T_MIN (-128) #define SCHAR_T_MAX 127 @@ -24819,8 +24819,8 @@ static void print_instructions(struct compile_state *state) last_occurance != ins->occurance) { if (!ins->occurance->parent) { fprintf(fp, "\t/* %s,%s:%d.%d */\n", - ins->occurance->function, - ins->occurance->filename, + ins->occurance->function?ins->occurance->function:"(null)", + ins->occurance->filename?ins->occurance->filename:"(null)", ins->occurance->line, ins->occurance->col); } |