From 1a47212c96be3b993402ce446363b93872b17e88 Mon Sep 17 00:00:00 2001 From: John Hodge Date: Fri, 3 Aug 2012 13:37:47 +0800 Subject: [PATCH] Usermode - Slight fixes in preparation for armv6 --- Usermode/Applications/Makefile.cfg | 3 ++- Usermode/Applications/Makefile.tpl | 4 ++-- Usermode/Libraries/ld-acess.so_src/_stublib.c | 1 + .../Libraries/ld-acess.so_src/include_exp/acess/intdefs.h | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Usermode/Applications/Makefile.cfg b/Usermode/Applications/Makefile.cfg index 5ee4b73f..0e89a7c5 100644 --- a/Usermode/Applications/Makefile.cfg +++ b/Usermode/Applications/Makefile.cfg @@ -8,7 +8,8 @@ ASFLAGS = -felf CPPFLAGS = -ffreestanding -I$(ACESSUSERDIR)/include/ -DARCHDIR_is_$(ARCHDIR) CPPFLAGS += $(addprefix -I,$(wildcard $(ACESSUSERDIR)Libraries/*/include_exp/)) CFLAGS = -fno-stack-protector $(CPPFLAGS) -LDFLAGS = -T $(OUTPUTDIR)Libs/acess.ld -rpath-link $(OUTPUTDIR)Libs -L $(OUTPUTDIR)Libs -I /Acess/Libs/ld-acess.so -lld-acess -lc $(OUTPUTDIR)Libs/crtbegin.o $(OUTPUTDIR)Libs/crtend.o $(shell $(CC) -print-libgcc-file-name) +LDFLAGS = -T $(OUTPUTDIR)Libs/acess.ld -rpath-link $(OUTPUTDIR)Libs -L $(OUTPUTDIR)Libs -I /Acess/Libs/ld-acess.so -lld-acess -lc $(OUTPUTDIR)Libs/crtbegin.o $(OUTPUTDIR)Libs/crtend.o +LIBGCC_PATH = $(shell $(CC) -print-libgcc-file-name) # Extra-verbose errors! #CFLAGS += -Wall -Wextra -Wwrite-strings -Wshadow -Wswitch-default -Wswitch-enum -Wstrict-overflow=5 -Wfloat-equal -Wundef -Wmissing-declarations -Wlogical-op diff --git a/Usermode/Applications/Makefile.tpl b/Usermode/Applications/Makefile.tpl index 27cf9e54..c1245ae2 100644 --- a/Usermode/Applications/Makefile.tpl +++ b/Usermode/Applications/Makefile.tpl @@ -35,9 +35,9 @@ $(_BIN): $(OUTPUTDIR)Libs/acess.ld $(OUTPUTDIR)Libs/crt0.o $(_LIBS) $(OBJ) @mkdir -p $(dir $(_BIN)) @echo [LD] -o $@ ifneq ($(_DBGMAKEFILE),) - $(LD) -g $(LDFLAGS) -o $@ $(OBJ) -Map $(_OBJPREFIX)Map.txt + $(LD) -g $(LDFLAGS) -o $@ $(OBJ) -Map $(_OBJPREFIX)Map.txt $(LIBGCC_PATH) else - @$(LD) -g $(LDFLAGS) -o $@ $(OBJ) -Map $(_OBJPREFIX)Map.txt + @$(LD) -g $(LDFLAGS) -o $@ $(OBJ) -Map $(_OBJPREFIX)Map.txt $(LIBGCC_PATH) endif @$(DISASM) $(_BIN) > $(_OBJPREFIX)$(BIN).dsm diff --git a/Usermode/Libraries/ld-acess.so_src/_stublib.c b/Usermode/Libraries/ld-acess.so_src/_stublib.c index 40967680..11362261 100644 --- a/Usermode/Libraries/ld-acess.so_src/_stublib.c +++ b/Usermode/Libraries/ld-acess.so_src/_stublib.c @@ -25,4 +25,5 @@ uint32_t __umodsi3(uint32_t Num, uint32_t Den){return 0;} #endif void *_crt0_exit_handler; +void abort(void){} diff --git a/Usermode/Libraries/ld-acess.so_src/include_exp/acess/intdefs.h b/Usermode/Libraries/ld-acess.so_src/include_exp/acess/intdefs.h index 46a06c40..36086d09 100644 --- a/Usermode/Libraries/ld-acess.so_src/include_exp/acess/intdefs.h +++ b/Usermode/Libraries/ld-acess.so_src/include_exp/acess/intdefs.h @@ -22,7 +22,7 @@ typedef __uint32_t __uintptr_t; #elif defined(ARCHDIR_is_x86_64) typedef __int64_t __intptr_t; typedef __uint64_t __uintptr_t; -#elif defined(ARCHDIR_is_armv7) +#elif defined(ARCHDIR_is_armv7) | defined(ARCHDIR_is_armv6) typedef __int32_t __intptr_t; typedef __uint32_t __uintptr_t; #else -- 2.20.1