diff options
author | Eric Andersen <andersen@codepoet.org> | 2002-11-27 23:34:07 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2002-11-27 23:34:07 +0000 |
commit | ae35d725cf586347b2adb1a6fe4216e70fce16cf (patch) | |
tree | 9fcdb86297695c3324e386e483e85db53133b412 /extra/gcc-uClibc/Makefile | |
parent | 44c91e654102116f99f80635c483db49126730e8 (diff) |
Make support for global constructors and global destructors be
configurable, so people who do not need or want ctor/dtor support
can disable it and make their binaries a little bit smaller.
-Erik
Diffstat (limited to 'extra/gcc-uClibc/Makefile')
-rw-r--r-- | extra/gcc-uClibc/Makefile | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/extra/gcc-uClibc/Makefile b/extra/gcc-uClibc/Makefile index 677b10f3a..1c64f856a 100644 --- a/extra/gcc-uClibc/Makefile +++ b/extra/gcc-uClibc/Makefile @@ -1,7 +1,7 @@ # Makefile for building a fake gcc/binutils toolchain # that simply spoofs the location of the C library # -# Copyright (C) 2000,2001 Erik Andersen <andersen@uclibc.org> +# Copyright (C) 2000-2002 Erik Andersen <andersen@uclibc.org> # TOPDIR = ../../ @@ -34,6 +34,11 @@ ifeq ($(strip $(HAS_ELF)),y) else @echo "#undef __HAS_ELF__" >> gcc-uClibc.h endif +ifeq ($(strip $(UCLIBC_CTOR_DTOR)),y) + @echo "#define __UCLIBC_CTOR_DTOR__ 1" >> gcc-uClibc.h +else + @echo "#undef __UCLIBC_CTOR_DTOR__" >> gcc-uClibc.h +endif gcc-uClibc: gcc-uClibc.h gcc-uClibc.c $(NATIVE_CC) $(NATIVE_CFLAGS) -Wl,-s gcc-uClibc.c -o $(TARGET_ARCH)-uclibc-gcc @@ -50,14 +55,16 @@ install: all install -d $(PREFIX)$(SYSTEM_DEVEL_PREFIX)/bin; install -m 755 $(TARGET_ARCH)-uclibc-gcc $(PREFIX)$(SYSTEM_DEVEL_PREFIX)/bin/ install -m 755 $(TARGET_ARCH)-uclibc-ld $(PREFIX)$(SYSTEM_DEVEL_PREFIX)/bin/ - ln -fs $(TARGET_ARCH)-uclibc-gcc $(PREFIX)$(SYSTEM_DEVEL_PREFIX)/bin/$(TARGET_ARCH)-uclibc-g++ - ln -fs $(TARGET_ARCH)-uclibc-gcc $(PREFIX)$(SYSTEM_DEVEL_PREFIX)/bin/$(TARGET_ARCH)-uclibc-c++ ln -fs $(TARGET_ARCH)-uclibc-gcc $(PREFIX)$(SYSTEM_DEVEL_PREFIX)/bin/$(TARGET_ARCH)-uclibc-cc - ln -fs $(SYSTEM_DEVEL_PREFIX)/bin/$(TARGET_ARCH)-uclibc-gcc $(PREFIX)$(DEVEL_TOOL_PREFIX)/bin/c++ - ln -fs $(SYSTEM_DEVEL_PREFIX)/bin/$(TARGET_ARCH)-uclibc-gcc $(PREFIX)$(DEVEL_TOOL_PREFIX)/bin/g++ ln -fs $(SYSTEM_DEVEL_PREFIX)/bin/$(TARGET_ARCH)-uclibc-gcc $(PREFIX)$(DEVEL_TOOL_PREFIX)/bin/gcc ln -fs $(SYSTEM_DEVEL_PREFIX)/bin/$(TARGET_ARCH)-uclibc-gcc $(PREFIX)$(DEVEL_TOOL_PREFIX)/bin/cc ln -fs $(SYSTEM_DEVEL_PREFIX)/bin/$(TARGET_ARCH)-uclibc-ld $(PREFIX)$(DEVEL_TOOL_PREFIX)/bin/ld +ifeq ($(strip $(UCLIBC_CTOR_DTOR)),y) + ln -fs $(TARGET_ARCH)-uclibc-gcc $(PREFIX)$(SYSTEM_DEVEL_PREFIX)/bin/$(TARGET_ARCH)-uclibc-g++ + ln -fs $(TARGET_ARCH)-uclibc-gcc $(PREFIX)$(SYSTEM_DEVEL_PREFIX)/bin/$(TARGET_ARCH)-uclibc-c++ + ln -fs $(SYSTEM_DEVEL_PREFIX)/bin/$(TARGET_ARCH)-uclibc-gcc $(PREFIX)$(DEVEL_TOOL_PREFIX)/bin/c++ + ln -fs $(SYSTEM_DEVEL_PREFIX)/bin/$(TARGET_ARCH)-uclibc-gcc $(PREFIX)$(DEVEL_TOOL_PREFIX)/bin/g++ +endif for app in addr2line ar as cpp gasp nm objcopy \ objdump ranlib size strings strip; do \ APPNAME=`which $(CROSS)$${app}`; \ |