浏览代码

we just want the kernel headers, not the whole kernel source ... so people may need to update their paths slightly

Mike Frysinger 18 年之前
父节点
当前提交
08e377aab1
共有 4 个文件被更改,包括 8 次插入8 次删除
  1. 2 2
      Makefile.in
  2. 3 3
      Rules.mak
  3. 2 2
      extra/Configs/Config.in.arch
  4. 1 1
      extra/scripts/gen_bits_syscall_h.sh

+ 2 - 2
Makefile.in

@@ -90,7 +90,7 @@ headers: include/bits/uClibc_config.h
 	cd $(top_builddir); \
 	cd $(top_builddir); \
 	tmp=`mktemp include/bits/sysnum.h.XXXXXX 2>/dev/null`; \
 	tmp=`mktemp include/bits/sysnum.h.XXXXXX 2>/dev/null`; \
 	[ -z "$$tmp" ] && tmp='include/bits/sysnum.h.new'; \
 	[ -z "$$tmp" ] && tmp='include/bits/sysnum.h.new'; \
-	KERNEL_SOURCE="${KERNEL_SOURCE}" top_builddir=. CC="$(CC) $(CPU_CFLAGS)" $(SHELL) extra/scripts/gen_bits_syscall_h.sh > $$tmp; \
+	KERNEL_HEADERS="${KERNEL_HEADERS}" top_builddir=. CC="$(CC) $(CPU_CFLAGS)" $(SHELL) extra/scripts/gen_bits_syscall_h.sh > $$tmp; \
 	if cmp include/bits/sysnum.h $$tmp >/dev/null 2>&1; then \
 	if cmp include/bits/sysnum.h $$tmp >/dev/null 2>&1; then \
 		$(RM) $$tmp; \
 		$(RM) $$tmp; \
 	else \
 	else \
@@ -111,7 +111,7 @@ RUNTIME_PREFIX_LIB_FROM_DEVEL_PREFIX_LIB=$(shell $(top_srcdir)extra/scripts/rela
 install_headers:
 install_headers:
 	$(INSTALL) -d $(PREFIX)$(DEVEL_PREFIX)include
 	$(INSTALL) -d $(PREFIX)$(DEVEL_PREFIX)include
 	printf ".svn\n.cvsignore\nCVS\n" > tar_exclude ; \
 	printf ".svn\n.cvsignore\nCVS\n" > tar_exclude ; \
-	if [ "$(KERNEL_SOURCE)" = "$(PREFIX)$(DEVEL_PREFIX)" ] ; then \
+	if [ "$(KERNEL_HEADERS)" = "$(PREFIX)$(DEVEL_PREFIX)" ] ; then \
 		ls -1d include/linux include/asm* >> tar_exclude ; \
 		ls -1d include/linux include/asm* >> tar_exclude ; \
 	fi ; \
 	fi ; \
 	$(TAR) -chf - -X tar_exclude include \
 	$(TAR) -chf - -X tar_exclude include \

+ 3 - 3
Rules.mak

@@ -64,8 +64,8 @@ TARGET_ARCH:=$(shell grep -s '^TARGET_ARCH' $(top_builddir)/.config | sed -e 's/
 TARGET_ARCH:=$(strip $(subst ",, $(strip $(TARGET_ARCH))))
 TARGET_ARCH:=$(strip $(subst ",, $(strip $(TARGET_ARCH))))
 RUNTIME_PREFIX:=$(strip $(subst //,/, $(subst ,/, $(subst ",, $(strip $(RUNTIME_PREFIX))))))
 RUNTIME_PREFIX:=$(strip $(subst //,/, $(subst ,/, $(subst ",, $(strip $(RUNTIME_PREFIX))))))
 DEVEL_PREFIX:=$(strip $(subst //,/, $(subst ,/, $(subst ",, $(strip $(DEVEL_PREFIX))))))
 DEVEL_PREFIX:=$(strip $(subst //,/, $(subst ,/, $(subst ",, $(strip $(DEVEL_PREFIX))))))
-KERNEL_SOURCE:=$(strip $(subst //,/, $(subst ,/, $(subst ",, $(strip $(KERNEL_SOURCE))))))
+KERNEL_HEADERS:=$(strip $(subst //,/, $(subst ,/, $(subst ",, $(strip $(KERNEL_HEADERS))))))
-export RUNTIME_PREFIX DEVEL_PREFIX KERNEL_SOURCE
+export RUNTIME_PREFIX DEVEL_PREFIX KERNEL_HEADERS
 
 
 
 
 # Now config hard core
 # Now config hard core
@@ -471,7 +471,7 @@ else
 	PTNAME :=
 	PTNAME :=
 	PTINC  :=
 	PTINC  :=
 endif
 endif
-CFLAGS += -I$(KERNEL_SOURCE)
+CFLAGS += -I$(KERNEL_HEADERS)
 
 
 # Sigh, some stupid versions of gcc can't seem to cope with '-iwithprefix include'
 # Sigh, some stupid versions of gcc can't seem to cope with '-iwithprefix include'
 #CFLAGS+=-iwithprefix include
 #CFLAGS+=-iwithprefix include

+ 2 - 2
extra/Configs/Config.in.arch

@@ -154,9 +154,9 @@ config DO_C99_MATH
 	  If your applications require the newer C99 math library functions, 
 	  If your applications require the newer C99 math library functions, 
 	  then answer Y.
 	  then answer Y.
 
 
-config KERNEL_SOURCE
+config KERNEL_HEADERS
 	string "Linux kernel header location"
 	string "Linux kernel header location"
-	default "/usr/src/linux"
+	default "/usr/src/linux/include"
 	help
 	help
 	  The kernel source you use to compile with should be the same as the
 	  The kernel source you use to compile with should be the same as the
 	  Linux kernel you run your apps on.  uClibc doesn't even try to achieve binary
 	  Linux kernel you run your apps on.  uClibc doesn't even try to achieve binary

+ 1 - 1
extra/scripts/gen_bits_syscall_h.sh

@@ -14,7 +14,7 @@
 #
 #
 # Warning!!! This does _no_ error checking!!!
 # Warning!!! This does _no_ error checking!!!
 
 
-INCLUDE_OPTS="-nostdinc -I${KERNEL_SOURCE}"
+INCLUDE_OPTS="-nostdinc -I${KERNEL_HEADERS}"
 
 
 case $CC in
 case $CC in
 *icc*) CC_SYSNUM_ARGS="-dM" ;;
 *icc*) CC_SYSNUM_ARGS="-dM" ;;