source: freewrt/mk/kpkg.mk@ 317392ca

Last change on this file since 317392ca was 6f1e502, checked in by Thorsten Glaser <tg@…>, 19 years ago
  • package.mk: pass the correct shared library runpath and the shared library link-time path to the linker (gcc); fixes most shlib dependency issues tested to build fine with approx. 80% of all packages; ok to commit now wbx@
  • kpkg.mk: at least linux 2.4 modules are built with LD=ld and not LD=gcc, so -Wl,-foo must be replaced by -foo (this is the reason why it's -Wl,-rpath -Wl,/usr/lib and not -Wl,-rpath,/usr/lib in package.mk)

git-svn-id: svn://www.freewrt.org/trunk/freewrt@1995 afb5a338-a214-0410-bd46-81f09a774fd1

  • Property mode set to 100644
File size: 1.3 KB
Line 
1# $FreeWRT$
2#-
3# This file is part of the FreeWRT project. FreeWRT is copyrighted
4# material, please see the LICENCE file in the top-level directory
5# or at http://www.freewrt.org/licence for details.
6
7include ${TOPDIR}/mk/targets.mk
8
9KERNEL_C_INCS:= 0
10
11ifeq (${CPU_ARCH},i386)
12KERNEL_C_INCS:= -I${LINUX_DIR}/include/asm-i386/mach-generic \
13 -I${LINUX_DIR}/include/asm-i386/mach-default
14KERNEL_C_OPTS:= -Os -march=i486 -mpreferred-stack-boundary=2 \
15 -fno-unit-at-a-time
16endif
17
18ifeq (${CPU_ARCH},mipsel)
19KERNEL_C_INCS:= -I${LINUX_DIR}/include/asm-mips/mach-generic
20KERNEL_C_OPTS:= -Os -G 0 -mno-abicalls -fno-pic -mabi=32 \
21 -finline-limit=100000 -march=mips32 -Wa,-32 \
22 -Wa,-march=mips32 -Wa,-mips32 -Wa,--trap
23endif
24
25ifeq ($(strip ${KERNEL_C_INCS}),0)
26$(error kernel architecture invalid)
27endif
28
29KERNEL_M_OPTS:= -D__KERNEL__ -DMODULE -fno-strict-aliasing -fno-common \
30 -fomit-frame-pointer -Wstrict-prototypes -Wno-trigraphs \
31 -nostdinc -I. -iwithprefix include \
32 -I${LINUX_DIR}/include -I${LINUX_DIR}/include/asm/gcc
33ifeq (${CPU_ARCH},mipsel)
34KERNEL_M_OPTS+= -mlong-calls
35endif
36
37TCPPFLAGS+= ${KERNEL_C_INCS}
38TCFLAGS+= ${KERNEL_C_OPTS}
39XAKE_FLAGS+= ARCH="${KERNEL_ARCH}" \
40 CROSS_COMPILE="${TARGET_CROSS}" \
41 c_opts="${KERNEL_C_OPTS}" \
42 KERNELVERSION="${KERNEL}"
43# this must be done because LD=ld not LD=cc
44TLDFLAGS:= ${TLDFLAGS:-Wl,%=%}
Note: See TracBrowser for help on using the repository browser.