makelib/config-x86_64-pc-linux-gnu.make
author Jan Vrany <jan.vrany@fit.cvut.cz>
Sun, 01 Apr 2018 22:41:43 +0100
branchstx-8.0.0
changeset 224 212ec423a6ab
parent 194 0695650e9b20
child 226 67883ba3bd17
permissions -rw-r--r--
Makefiles: remove use of `-nostdlib` when linking shared object Reason for its use is (was) unclear. Moreover, it causes link errors on some systems: /usr/lib32/libc_nonshared.a(atexit.oS): In function `atexit': (.text+0x11): undefined reference to `__dso_handle' /usr/bin/ld: /usr/lib32/libc_nonshared.a(atexit.oS): relocation R_386_GOTOFF against undefined hidden symbol `__dso_handle' can not be used when making a shared object /usr/bin/ld: final link failed: Bad value collect2: error: ld returned 1 exit status

#
# Definitions for target x86_66-pc-linux-gnu.
#
# based on eXept's:
#
# linux-elf/x86_64: cpu: x86_64 in 64 bit mode os:linux-ELF options: +commonSymbol
#
#------------------ start of linux/x86_64 ---------------------
#
# $Header: /cvs/stx/stx/configurations/linux-elf/x86_64/defines,v 1.18 2016-08-29 08:52:44 stefan Exp $

include $(MAKELIB)/config-linux-gnu.make
include $(MAKELIB)/config-x86_64.make

LDFLAGS=-Llib -L/usr/local/lib -L/usr/X11/lib \
	-Wl,-z,now,-Bsymbolic,-rpath,'$$ORIGIN',-rpath,'$$ORIGIN/lib',-rpath,'$$ORIGIN/../lib'
EXTRA_SHARED_LIBS=-ldl

# We have problems with FFI as of 2008-12-01
# Remove the follwoing lines when the problems have been fixed
FFI_OBJS=
OPTIONAL_HAVE_FFI_ARG=
OPTIONAL_FFI_TARGET_IN_LIBRUN=
# END FFI kludge

# LIBJPEG=$(LIBJPEG_DIR)/libjpeg.a
# LIBJPEG_FOR_COPY=$(LIBJPEG_DIR)/libjpeg.a
# LIBJPEG_FOR_LINK=$(LIBJPEG_DIR)/libjpeg.a


# a netsnmp library
#
# if already in /usr/lib:
# DYNAMIC_LINK_LIB_NETSNMP=-lnetsnmp
# STATIC_LINK_LIB_NETSNMP=
# TARGET_LIB_NETSNMP=
#
# if a local one should be built and used (for 64bit, no -lrt is needed):
DYNAMIC_LINK_LIB_NETSNMP=-L$(NETSNMP_LIBDIR)/.libs -L$(NETSNMP_LIBDIR) $(NETSNMP_LIBDIR)/.libs/libnetsnmp.a


MATRIXLOCK_DIR=$(TOP)/../exept/setup/ml
MATRIXLOCK_LIB_ARG=-L$(MATRIXLOCK_DIR)/lib -lmxlin64260
MATRIXLOCK_SHARED_LIB_ARG=-lusb

#.SUFFIXES: .o .so

#.o.so:
#	@-rm -f $*.so
#	$(LD) -shared $(LDFLAGS) -o $*.so $*.o $(LOCAL_SHARED_LIBS)

#------------------ end of linux-elf/x86_64 ---------------------
O_RULE=__STANDARD_O_RULE__
EXTRA_LIBS=-ldl -lX11 -lXext
MAKE_ZLIB_ARG= "CFLAGS=-fPIC -O3 -DUSE_MMAP"
FFI_OBJS=$(FFI_DIR)/build/src/*.o $(FFI_DIR)/build/src/x86/*.o
FFI_DIR=libffi-3.0.10rc8
OPTIONAL_HAVE_FFI_ARG=-DHAVE_FFI -I$(TOP)/librun/$(FFI_DIR)/build/include
OPTIONAL_FFI_TARGET_IN_LIBRUN=ffi
FFI_CC="$(CC) -m64 -fPIC"
FFI_LD="ld -m elf_x84_64"