1*ac13d5f3SPatrick Williams#ident "@(#)i586-linux-gcc.rul	1.18 18/11/07 "
2*ac13d5f3SPatrick Williams###########################################################################
3*ac13d5f3SPatrick Williams# Written 1996-2018 by J. Schilling
4*ac13d5f3SPatrick Williams###########################################################################
5*ac13d5f3SPatrick Williams#
6*ac13d5f3SPatrick Williams# Platform dependent MACROS for Linux
7*ac13d5f3SPatrick Williams#
8*ac13d5f3SPatrick Williams###########################################################################
9*ac13d5f3SPatrick Williams# Copyright (c) J. Schilling
10*ac13d5f3SPatrick Williams###########################################################################
11*ac13d5f3SPatrick Williams# The contents of this file are subject to the terms of the
12*ac13d5f3SPatrick Williams# Common Development and Distribution License, Version 1.0 only
13*ac13d5f3SPatrick Williams# (the "License").  You may not use this file except in compliance
14*ac13d5f3SPatrick Williams# with the License.
15*ac13d5f3SPatrick Williams#
16*ac13d5f3SPatrick Williams# See the file CDDL.Schily.txt in this distribution for details.
17*ac13d5f3SPatrick Williams# A copy of the CDDL is also available via the Internet at
18*ac13d5f3SPatrick Williams# http://www.opensource.org/licenses/cddl1.txt
19*ac13d5f3SPatrick Williams#
20*ac13d5f3SPatrick Williams# When distributing Covered Code, include this CDDL HEADER in each
21*ac13d5f3SPatrick Williams# file and include the License file CDDL.Schily.txt from this distribution.
22*ac13d5f3SPatrick Williams###########################################################################
23*ac13d5f3SPatrick Williamsinclude $(SRCROOT)/$(RULESDIR)/rules.prg
24*ac13d5f3SPatrick Williams###########################################################################
25*ac13d5f3SPatrick Williamsinclude $(SRCROOT)/$(RULESDIR)/cc-$(C_ARCH).rul
26*ac13d5f3SPatrick Williams
27*ac13d5f3SPatrick Williams#
28*ac13d5f3SPatrick Williams# LINUX_SRC_INCLUDE is defined in DEFAULTS/Defaults.linux
29*ac13d5f3SPatrick Williams#
30*ac13d5f3SPatrick WilliamsINCDIRSX +=	$(LINUX_SRC_INCLUDE)
31*ac13d5f3SPatrick WilliamsOSDEFS +=
32*ac13d5f3SPatrick Williams
33*ac13d5f3SPatrick WilliamsKDEFINES=	-DKERNEL -D_KERNEL
34*ac13d5f3SPatrick Williams
35*ac13d5f3SPatrick WilliamsLIB_PREFIX=	lib
36*ac13d5f3SPatrick WilliamsLIB_SUFFIX=	.a
37*ac13d5f3SPatrick WilliamsSHL_SUFFIX=	.so.$(DYNMAJOR).$(DYNMINOR)
38*ac13d5f3SPatrick Williams
39*ac13d5f3SPatrick WilliamsLIB_SOCKET=
40*ac13d5f3SPatrick WilliamsLIB_MATH=	-lm
41*ac13d5f3SPatrick WilliamsLIB_KVM=
42*ac13d5f3SPatrick Williams
43*ac13d5f3SPatrick Williams#
44*ac13d5f3SPatrick Williams# Sunpro C/C++ run on Solaris and Linux and both have linkers
45*ac13d5f3SPatrick Williams# that support mapfiles
46*ac13d5f3SPatrick Williams#
47*ac13d5f3SPatrick WilliamsMAPVERS=	$(_MAPVERS) # This enables to use mapfiles
48*ac13d5f3SPatrick Williams#
49*ac13d5f3SPatrick Williams# The GNU linker is buggy and does not like the official order in linker map
50*ac13d5f3SPatrick Williams# files for symbol versioning. The following command reverses the order of
51*ac13d5f3SPatrick Williams# the version names in the linker map file.
52*ac13d5f3SPatrick Williams#
53*ac13d5f3SPatrick WilliamsMAPFILE_POST=	| sed 's/^SCHILY/+SCHILY/' | tr '\012' '@' | tr '+' '\012' | sort -V |  tr '@' '\012'
54*ac13d5f3SPatrick Williams
55*ac13d5f3SPatrick Williams#LDOPTS=		$(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%)
56*ac13d5f3SPatrick Williams#
57*ac13d5f3SPatrick Williams# Uncomment the next line in case you are on an old Linux version that
58*ac13d5f3SPatrick Williams# does not support the -R linker flag.
59*ac13d5f3SPatrick Williams#
60*ac13d5f3SPatrick Williams#LDOPTS=		$(LIBS_PATH) $(LDPATH)
61*ac13d5f3SPatrick WilliamsLDOPTMAP=	$(PMAPVERS:%=-Wl,--version-script=%)
62*ac13d5f3SPatrick WilliamsLDOPTDYN=	-shared -Wl,-soname,$(TARGET) $(LDOPTMAP)
63*ac13d5f3SPatrick Williams
64*ac13d5f3SPatrick WilliamsLORDER=		echo
65*ac13d5f3SPatrick WilliamsTSORT=		cat
66