diff options
author | H. Peter Anvin <hpa@zytor.com> | 2002-08-23 05:44:48 +0000 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2002-08-23 05:44:48 +0000 |
commit | b17a5299c30db2a996a22dea24489786eb79d717 (patch) | |
tree | b11e4c52ad81dc0fb54da4e191be4f540f2e283d | |
parent | 6de81f89dd48e0e89900d4e49c7a0dec8ffdfd28 (diff) | |
download | klibc-b17a5299c30db2a996a22dea24489786eb79d717.tar.gz |
Make SRCROOT the basis for relative paths, and let there be where theklibc-0.57
"linux" link goes.
-rw-r--r-- | MCONFIG | 3 | ||||
-rw-r--r-- | ash/Makefile | 2 | ||||
-rw-r--r-- | gzip/Makefile | 5 | ||||
-rw-r--r-- | klibc/MCONFIG | 3 | ||||
-rw-r--r-- | klibc/README | 18 | ||||
-rw-r--r-- | klibc/__main.c | 17 | ||||
-rw-r--r-- | utils/Makefile | 3 |
7 files changed, 17 insertions, 34 deletions
@@ -7,11 +7,12 @@ ARCH = $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/ CROSS = CC = $(CROSS)gcc LD = $(CROSS)ld +KLIBSRC = $(SRCROOT)/klibc REQFLAGS = -nostdinc -iwithprefix include -I$(KLIBSRC) \ -I$(KLIBSRC)/arch/$(ARCH)/include \ -I$(KLIBSRC)/include/bits$(BITSIZE) \ -DBITSIZE=$(BITSIZE) -I$(KLIBSRC)/include \ - -I$(KLIBSRC)/linux/include + -I$(SRCROOT)/linux/include LDFLAGS = AR = $(CROSS)ar RANLIB = $(CROSS)ranlib diff --git a/ash/Makefile b/ash/Makefile index 5f2e8df6afb13..99ad4415beb30 100644 --- a/ash/Makefile +++ b/ash/Makefile @@ -12,7 +12,7 @@ OBJ2 = builtins.o cd.o dirent.o bltin/echo.o error.o eval.o exec.o expand.o \ OBJS = $(OBJ1) $(OBJ2) -KLIBSRC = ../klibc +SRCROOT = .. include ../MCONFIG MAKEDEPS = -Wp,-MD,.$(subst /,-,$*).d diff --git a/gzip/Makefile b/gzip/Makefile index cb4f0f554e70d..c33794f50d0a1 100644 --- a/gzip/Makefile +++ b/gzip/Makefile @@ -16,12 +16,11 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -# $Id: Makefile,v 1.3 2002/08/21 08:38:07 rmk Exp $ +# $Id: Makefile,v 1.4 2002/08/23 21:06:05 hpa Exp $ #### Start of system configuration section. #### -KLIBSRC = ../klibc - +SRCROOT = .. include ../MCONFIG include MCONFIG diff --git a/klibc/MCONFIG b/klibc/MCONFIG index 760ae789f3ebe..71ba121eb7d38 100644 --- a/klibc/MCONFIG +++ b/klibc/MCONFIG @@ -3,8 +3,7 @@ # Makefile configuration, without explicit rules # -KLIBSRC = . - +SRCROOT = .. include ../MCONFIG WARNFLAGS = -W -Wall -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Winline diff --git a/klibc/README b/klibc/README index 5e66a3af8d117..ccbb7193e5dc4 100644 --- a/klibc/README +++ b/klibc/README @@ -7,13 +7,14 @@ work in progress, and a lot of things are still missing. The build procedure is not very polished yet, but it should work like this: -a) Create a symlink called "linux" pointing to a reasonably recent - Linux kernel tree (2.4 or 2.5 should be OK.) This tree must have - the include/asm symlink set up for the architecture you're - compiling for, and include/linux/autoconf.h must exist. The - easiest way to make sure of all of these is to do a "make config" - or any of its variants on the kernel tree is question, followed by - a "make dep". +a) In the source root directory (the directory above the one in which + this file is found) create a symlink called "linux" pointing to a + reasonably recent Linux kernel tree (2.4 or 2.5 should be OK.) + This tree must have the include/asm symlink set up for the + architecture you're compiling for, and include/linux/autoconf.h + must exist. The easiest way to make sure of all of these is to do + a "make config" or any of its variants on the kernel tree is + question, followed by a "make dep". b) If you're cross-compiling, change ARCH in the main MCONFIG file to the appropriate architecture, and set CROSS to your toolchain @@ -31,7 +32,8 @@ b) If you're cross-compiling, change ARCH in the main MCONFIG file to The following is the status of various architectures: - Known to work: arm alpha i386 ppc sparc sparc64 + Known to work: arm i386 sparc sparc64 + Need crt0.S updates: alpha ppc Missing setjmp: s390 s390x ppc64 May or may not work: x86_64 Need porting work: cris ia64 m68k mips64 parisc sh diff --git a/klibc/__main.c b/klibc/__main.c deleted file mode 100644 index 81a16f59d8f2c..0000000000000 --- a/klibc/__main.c +++ /dev/null @@ -1,17 +0,0 @@ -/* - * __main.c - * - * Some architectures only have a minimal crt0.S stub. This completes - * the initialization code. - */ - -#include <stdlib.h> -#include <unistd.h> - -extern int main(int argc, char * const *argv, char * const *envp); - -void __main(int argc, char **argv, char **envp) -{ - environ = envp; - exit(main(argc, argv, envp)); -} diff --git a/utils/Makefile b/utils/Makefile index b84ee69e5fa9d..24f7b91e6446d 100644 --- a/utils/Makefile +++ b/utils/Makefile @@ -1,5 +1,4 @@ -KLIBSRC = ../klibc - +SRCROOT = .. include ../MCONFIG MAKEDEPS = -Wp,-MD,.$(subst /,-,$*).d |