Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Large cleanup patch, based in large part on a patch from
Stefan Allius, which adds a great deal of sanity.
  • Loading branch information
ErikBAndersen committed Nov 8, 2002
1 parent e89052a commit f149abb
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 29 deletions.
57 changes: 37 additions & 20 deletions Rules.mak
@@ -1,9 +1,5 @@
# Rules.make for uClibc
#
# This file contains rules which are shared between multiple Makefiles. All
# normal configuration options live in the file named "Config". You probably
# should not mess with this file unless you know what you are doing...
#
# Copyright (C) 2000 by Lineo, inc.
# Copyright (C) 2000-2002 Erik Andersen <andersen@uclibc.org>
#
Expand All @@ -21,23 +17,39 @@
# along with this program; if not, write to the Free Software Foundation, Inc.,
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

# If you are running a cross compiler, you may want to set this

#--------------------------------------------------------
# This file contains rules which are shared between multiple Makefiles.
# All normal configuration options live in the file named ".config".
# Don't mess with this file unless you know what you are doing.


#--------------------------------------------------------
# If you are running a cross compiler, you will want to set 'CROSS'
# to something more interesting... Target architecture is determined
# by asking this compiler what arch it compiles stuff for.
# by asking the CC compiler what arch it compiles things for, so unless
# your compiler is broken, you should not need to specify TARGET_ARCH
#
# Most people will set this stuff on the command line, i.e.
# make CROSS=mipsel-linux-
# will build uClibc for 'mipsel'.

CROSS=
CC = $(CROSS)gcc
AR = $(CROSS)ar
LD = $(CROSS)ld
NM = $(CROSS)nm
STRIPTOOL = $(CROSS)strip
#STRIPTOOL = /bin/true
CC:= $(CROSS)gcc
AR:= $(CROSS)ar
LD:= $(CROSS)ld
NM:= $(CROSS)nm
STRIPTOOL:= $(CROSS)strip

# Select the compiler needed to build binaries for your development system
NATIVE_CC = gcc
NATIVE_CC:=gcc
NATIVE_CFLAGS:=-O2 -Wall


# Be sure to update include/features.h when changing this...
#--------------------------------------------------------
# Nothing beyond this point should ever be touched by mere mortals.
# Unless you hang out with the gods, you should probably leave all
# this stuff alone.
MAJOR_VERSION:=0
MINOR_VERSION:=9
SUBLEVEL:=15
Expand All @@ -51,8 +63,6 @@ SHARED_MAJORNAME:=libc.so.$(MAJOR_VERSION)
UCLIBC_LDSO:=ld-uClibc.so.$(MAJOR_VERSION)
LIBNAME:=libc.a
LIBC:=$(TOPDIR)libc/$(LIBNAME)
LIBGCC:=$(shell $(CC) $(LIBGCC_CFLAGS) -print-libgcc-file-name)
LIBGCC_DIR:=$(dir $(LIBGCC))

# Pull in the user's uClibc configuration
ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),)
Expand Down Expand Up @@ -129,6 +139,9 @@ endif

ifeq ($(strip $(TARGET_ARCH)),sh)
OPTIMIZATION+=-fstrict-aliasing
OPTIMIZATION+= $(call check_gcc,-mprefergot,)
CPU_LDFLAGS-$(ARCH_LITTLE_ENDIAN):="-EL"
CPU_LDFLAGS-$(ARCH_BIG_ENDIAN):="-EB"
CPU_CFLAGS-$(ARCH_LITTLE_ENDIAN):="-ml"
CPU_CFLAGS-$(ARCH_BIG_ENDIAN):="-mb"
CPU_CFLAGS-$(CONFIG_SH2)+="-m2"
Expand All @@ -151,10 +164,10 @@ CFLAGS+=$(shell $(CC) -print-search-dirs | sed -ne "s/install: *\(.*\)/-I\1inclu

ifeq ($(strip $(DODEBUG)),y)
CFLAGS += -g
LDFLAGS:= -shared --warn-common --warn-once -z combreloc
LDFLAGS:= $(CPU_LDFLAGS-y) -shared --warn-common --warn-once -z combreloc
STRIPTOOL:= true -Since_we_are_debugging
else
LDFLAGS := -s -shared --warn-common --warn-once -z combreloc
LDFLAGS := $(CPU_LDFLAGS-y) -s -shared --warn-common --warn-once -z combreloc
endif
ifneq ($(strip $(DOASSERTS)),y)
CFLAGS += -DNDEBUG
Expand All @@ -175,10 +188,14 @@ endif
ifeq ($(strip $(DOPIC)),y)
CFLAGS += -fPIC
endif
ifeq ($(strip $(USE_GCC_SOFT_FLOAT_OPTION)),y)
CFLAGS += -msoft-float
ifeq ($(strip $(UCLIBC_HAS_SOFT_FLOAT)),y)
CFLAGS += $(call check_gcc,-msoft-float,)
endif

LIBGCC_CFLAGS ?= $(CFLAGS)
LIBGCC:=$(shell $(CC) $(LIBGCC_CFLAGS) -print-libgcc-file-name)
LIBGCC_DIR:=$(dir $(LIBGCC))

# TARGET_PREFIX is the directory under which which the uClibc runtime
# environment will be installed and used on the target system. The
# result will look something like the following:
Expand Down
9 changes: 0 additions & 9 deletions extra/Configs/Config.in.arch
Expand Up @@ -46,15 +46,6 @@ config UCLIBC_HAS_SOFT_FLOAT
depends on UCLIBC_HAS_FLOATS && !HAS_FPU
default y

config USE_GCC_SOFT_FLOAT_OPTION
bool
depends UCLIBC_HAS_SOFT_FLOAT
default y if !ARCH_HAS_NO_FPU
help
True if we should use the gcc `-msoft-float' option when
compiling in soft-float support (not all platforms use that
option, even if they use soft-floats).

config DO_C99_MATH
bool "Enable full C99 math library support"
depends on UCLIBC_HAS_FLOATS
Expand Down

0 comments on commit f149abb

Please sign in to comment.