Bug 163018 Fix support for lib64 & x86-64 architectures

patch by gbeauchesne@mandrakesoft.com r=shaver a=asa


git-svn-id: svn://10.0.0.236/trunk@142522 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
timeless%mozdev.org
2003-05-16 00:21:08 +00:00
parent 3561d42d1b
commit 3590a4fbb0
4 changed files with 29 additions and 7 deletions

View File

@@ -152,3 +152,10 @@ VPATH = $(OBJDIR)
DEPENDENCIES = $(OBJDIR)/.md
LCJAR = js15lc30.jar
# Library name
LIB := lib
ifeq ($(CPU_ARCH), x86_64)
LIB := lib64
endif

View File

@@ -48,6 +48,8 @@ MKSHLIB = $(LD) -shared $(XMKSHLIBOPTS)
# $(CC) -c -MD $*.d $(CFLAGS) $<
CPU_ARCH = $(shell uname -m)
# don't filter in x86-64 architecture
ifneq (x86_64,$(CPU_ARCH))
ifeq (86,$(findstring 86,$(CPU_ARCH)))
CPU_ARCH = x86
OS_CFLAGS+= -DX86_LINUX
@@ -62,8 +64,9 @@ ifeq (2.91.66, $(firstword $(GCC_LIST)))
CFLAGS+= -DGCC_OPT_BUG
endif
endif
endif
endif
GFX_ARCH = x
OS_LIBS = -lm -lc
@@ -81,3 +84,15 @@ endif
# Use the editline library to provide line-editing support.
JS_EDITLINE = 1
ifeq ($(CPU_ARCH),x86_64)
# Use VA_COPY() standard macro on x86-64
# FIXME: better use it everywhere
OS_CFLAGS += -DHAVE_VA_COPY
endif
ifeq ($(CPU_ARCH),x86_64)
# We need PIC code for shared libraries
# FIXME: better patch rules.mk & fdlibm/Makefile*
OS_CFLAGS += -DPIC -fPIC
endif

View File

@@ -141,10 +141,10 @@ endif
endif
ship:
mkdir -p $(SHIP_DIR)/lib
mkdir -p $(SHIP_DIR)/$(LIB)
mkdir -p $(SHIP_DIR)/include
mkdir -p $(SHIP_DIR)/bin
cp $(SHIP_LIBS) $(SHIP_DIR)/lib
cp $(SHIP_LIBS) $(SHIP_DIR)/$(LIB)
cp $(SHIP_INCS) $(SHIP_DIR)/include
cp $(SHIP_BINS) $(SHIP_DIR)/bin
cd $(SHIP_DIR); \

View File

@@ -153,18 +153,18 @@ endif
export:
+$(LOOP_OVER_PREDIRS)
mkdir -p $(DIST)/include $(DIST)/lib $(DIST)/bin
mkdir -p $(DIST)/include $(DIST)/$(LIB) $(DIST)/bin
ifneq "$(strip $(HFILES))" ""
$(CP) $(HFILES) $(DIST)/include
endif
ifneq "$(strip $(LIBRARY))" ""
$(CP) $(LIBRARY) $(DIST)/lib
$(CP) $(LIBRARY) $(DIST)/$(LIB)
endif
ifneq "$(strip $(JARS))" ""
$(CP) $(JARS) $(DIST)/lib
$(CP) $(JARS) $(DIST)/$(LIB)
endif
ifneq "$(strip $(SHARED_LIBRARY))" ""
$(CP) $(SHARED_LIBRARY) $(DIST)/lib
$(CP) $(SHARED_LIBRARY) $(DIST)/$(LIB)
endif
ifneq "$(strip $(PROGRAM))" ""
$(CP) $(PROGRAM) $(DIST)/bin