Makefile.com revision 7b1b42816975f5b0069dff7932115ba672ad125c
0N/A#
0N/A# CDDL HEADER START
0N/A#
121N/A# The contents of this file are subject to the terms of the
0N/A# Common Development and Distribution License (the "License").
0N/A# You may not use this file except in compliance with the License.
518N/A#
518N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
518N/A# or http://www.opensolaris.org/os/licensing.
518N/A# See the License for the specific language governing permissions
0N/A# and limitations under the License.
518N/A#
0N/A# When distributing Covered Code, include this CDDL HEADER in each
0N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
0N/A# If applicable, add the following below this CDDL HEADER, with the
0N/A# fields enclosed by brackets "[]" replaced with your own identifying
827N/A# information: Portions Copyright [yyyy] [name of copyright owner]
827N/A#
829N/A# CDDL HEADER END
829N/A#
829N/A
829N/A#
829N/A# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
829N/A# Use is subject to license terms.
829N/A#
829N/A
829N/ALIB_PIC= libc_pic.a
829N/AVERS= .1
829N/ACPP= /usr/lib/cpp
829N/ATARGET_ARCH= i386
829N/A
829N/AVALUES= values-Xa.o
827N/A
827N/A# objects are grouped by source directory
827N/A
827N/A# local objects
827N/ASTRETS=
827N/A
827N/ACRTOBJS= \
827N/A cerror.o \
828N/A cerror64.o
828N/A
828N/ADYNOBJS= \
828N/A _rtbootld.o
828N/A
828N/AFPOBJS= \
827N/A _D_cplx_div.o \
827N/A _D_cplx_div_ix.o \
726N/A _D_cplx_div_rx.o \
726N/A _D_cplx_lr_div.o \
726N/A _D_cplx_lr_div_ix.o \
726N/A _D_cplx_lr_div_rx.o \
726N/A _D_cplx_mul.o \
726N/A _F_cplx_div.o \
726N/A _F_cplx_div_ix.o \
726N/A _F_cplx_div_rx.o \
726N/A _F_cplx_lr_div.o \
726N/A _F_cplx_lr_div_ix.o \
726N/A _F_cplx_lr_div_rx.o \
660N/A _F_cplx_mul.o \
660N/A _X_cplx_div.o \
660N/A _X_cplx_div_ix.o \
660N/A _X_cplx_div_rx.o \
660N/A _X_cplx_lr_div.o \
660N/A _X_cplx_lr_div_ix.o \
660N/A _X_cplx_lr_div_rx.o \
660N/A _X_cplx_mul.o \
660N/A _base_il.o \
690N/A fpgetmask.o \
690N/A fpgetround.o \
690N/A fpgetsticky.o \
690N/A fpsetmask.o \
690N/A fpsetround.o \
690N/A fpsetsticky.o \
690N/A fpstart.o
690N/A
690N/AFPASMOBJS= \
660N/A __xgetRD.o \
660N/A _xtoll.o \
518N/A _xtoull.o \
518N/A fpcw.o
518N/A
518N/AATOMICOBJS= \
518N/A atomic.o
518N/A
518N/AXATTROBJS= \
518N/A xattr_common.o
518N/A
518N/ACOMOBJS= \
518N/A bcmp.o \
518N/A bcopy.o \
518N/A bsearch.o \
518N/A bzero.o \
518N/A ffs.o \
518N/A qsort.o \
518N/A strtol.o \
518N/A strtoul.o
518N/A
518N/ADTRACEOBJS= \
518N/A dtrace_data.o
518N/A
518N/AGENOBJS= \
518N/A _div64.o \
518N/A _divdi3.o \
518N/A _getsp.o \
518N/A _mul64.o \
518N/A abs.o \
518N/A alloca.o \
518N/A byteorder.o \
518N/A byteorder64.o \
518N/A cuexit.o \
518N/A ecvt.o \
518N/A errlst.o \
518N/A i386_data.o \
518N/A ladd.o \
518N/A ldivide.o \
518N/A lmul.o \
518N/A lock.o \
518N/A lshiftl.o \
518N/A lsign.o \
555N/A lsub.o \
555N/A makectxt.o \
555N/A memccpy.o \
555N/A memchr.o \
555N/A memcmp.o \
555N/A memcpy.o \
555N/A memset.o \
555N/A new_list.o \
555N/A setjmp.o \
555N/A siginfolst.o \
555N/A siglongjmp.o \
555N/A strcat.o \
555N/A strchr.o \
555N/A strcmp.o \
555N/A strcpy.o \
555N/A strlen.o \
555N/A strncat.o \
555N/A strncmp.o \
555N/A strncpy.o \
555N/A strnlen.o \
555N/A strrchr.o \
555N/A sync_instruction_memory.o
555N/A
555N/A# sysobjs that contain large-file interfaces
555N/ACOMSYSOBJS64= \
555N/A creat64.o \
518N/A fstat64.o \
518N/A fstatvfs64.o \
289N/A getdents64.o \
289N/A getrlimit64.o \
289N/A lseek64.o \
289N/A lstat64.o \
289N/A open64.o \
289N/A pread64.o \
289N/A pwrite64.o \
289N/A setrlimit64.o \
289N/A stat64.o \
289N/A statvfs64.o
289N/A
289N/ASYSOBJS64= \
289N/A mmap64.o
289N/A
289N/ACOMSYSOBJS= \
289N/A __clock_timer.o \
289N/A __getloadavg.o \
289N/A __rusagesys.o \
289N/A __signotify.o \
289N/A __sigrt.o \
289N/A __time.o \
174N/A _lgrp_home_fast.o \
174N/A _lgrpsys.o \
174N/A _nfssys.o \
174N/A _portfs.o \
174N/A _pset.o \
174N/A _rpcsys.o \
174N/A _sigaction.o \
174N/A _so_accept.o \
174N/A _so_bind.o \
174N/A _so_connect.o \
174N/A _so_getpeername.o \
174N/A _so_getsockname.o \
174N/A _so_getsockopt.o \
174N/A _so_listen.o \
174N/A _so_recv.o \
174N/A _so_recvfrom.o \
174N/A _so_recvmsg.o \
174N/A _so_send.o \
174N/A _so_sendmsg.o \
174N/A _so_sendto.o \
0N/A _so_setsockopt.o \
0N/A _so_shutdown.o \
0N/A _so_socket.o \
0N/A _so_socketpair.o \
0N/A _sockconfig.o \
0N/A access.o \
0N/A acct.o \
0N/A acl.o \
0N/A adjtime.o \
518N/A alarm.o \
0N/A brk.o \
0N/A chdir.o \
0N/A chmod.o \
0N/A chown.o \
0N/A chroot.o \
0N/A cladm.o \
0N/A close.o \
0N/A creat.o \
0N/A dup.o \
0N/A execve.o \
0N/A exit.o \
0N/A facl.o \
0N/A fchdir.o \
0N/A fchmod.o \
0N/A fchown.o \
0N/A fchroot.o \
0N/A fcntl.o \
0N/A fdsync.o \
0N/A fpathconf.o \
0N/A fstat.o \
0N/A fstatfs.o \
0N/A fstatvfs.o \
0N/A getcpuid.o \
0N/A getdents.o \
0N/A getegid.o \
0N/A geteuid.o \
0N/A getgid.o \
0N/A getgroups.o \
0N/A gethrtime.o \
0N/A getitimer.o \
0N/A getmsg.o \
0N/A getpid.o \
0N/A getpmsg.o \
0N/A getppid.o \
0N/A getrlimit.o \
0N/A getuid.o \
0N/A gtty.o \
0N/A install_utrap.o \
0N/A ioctl.o \
0N/A kaio.o \
0N/A kill.o \
0N/A lchown.o \
0N/A link.o \
0N/A llseek.o \
0N/A lseek.o \
0N/A lstat.o \
0N/A mmapobjsys.o \
0N/A memcntl.o \
0N/A mincore.o \
0N/A mkdir.o \
0N/A mknod.o \
0N/A mmap.o \
0N/A modctl.o \
0N/A mount.o \
0N/A mprotect.o \
0N/A munmap.o \
0N/A nice.o \
0N/A ntp_adjtime.o \
0N/A ntp_gettime.o \
0N/A open.o \
0N/A p_online.o \
0N/A pathconf.o \
0N/A pause.o \
0N/A pcsample.o \
0N/A pollsys.o \
0N/A pread.o \
0N/A priocntlset.o \
0N/A processor_bind.o \
0N/A processor_info.o \
0N/A profil.o \
0N/A putmsg.o \
putpmsg.o \
pwrite.o \
read.o \
readlink.o \
readv.o \
rename.o \
resolvepath.o \
rmdir.o \
seteguid.o \
setgid.o \
setgroups.o \
setitimer.o \
setreid.o \
setrlimit.o \
setuid.o \
sigaltstk.o \
sigprocmsk.o \
sigsendset.o \
sigsuspend.o \
stat.o \
statfs.o \
statvfs.o \
stty.o \
symlink.o \
sync.o \
sysconfig.o \
sysfs.o \
sysinfo.o \
syslwp.o \
times.o \
ulimit.o \
umask.o \
umount2.o \
unlink.o \
utime.o \
utimes.o \
utssys.o \
uucopy.o \
vhangup.o \
waitid.o \
write.o \
writev.o \
yield.o
SYSOBJS= \
__clock_gettime.o \
__getcontext.o \
__uadmin.o \
_lwp_mutex_unlock.o \
_stack_grow.o \
door.o \
forkx.o \
forkallx.o \
fxstat.o \
getcontext.o \
gettimeofday.o \
lwp_private.o \
lxstat.o \
nuname.o \
pipe.o \
ptrace.o \
syscall.o \
sysi86.o \
tls_get_addr.o \
uadmin.o \
umount.o \
uname.o \
vforkx.o \
xmknod.o \
xstat.o
# objects under ../port which contain transitional large file interfaces
PORTGEN64= \
_xftw64.o \
attropen64.o \
ftw64.o \
mkstemp64.o \
nftw64.o \
tell64.o \
truncate64.o
# objects from source under ../port
PORTFP= \
__flt_decim.o \
__flt_rounds.o \
__tbl_10_b.o \
__tbl_10_h.o \
__tbl_10_s.o \
__tbl_2_b.o \
__tbl_2_h.o \
__tbl_2_s.o \
__tbl_fdq.o \
__tbl_tens.o \
__x_power.o \
_base_sup.o \
aconvert.o \
decimal_bin.o \
double_decim.o \
econvert.o \
fconvert.o \
file_decim.o \
finite.o \
fp_data.o \
func_decim.o \
gconvert.o \
hex_bin.o \
ieee_globals.o \
pack_float.o \
sigfpe.o \
string_decim.o
PORTGEN= \
_env_data.o \
_xftw.o \
a64l.o \
abort.o \
addsev.o \
assert.o \
atof.o \
atoi.o \
atol.o \
atoll.o \
attrat.o \
attropen.o \
atexit.o \
atfork.o \
basename.o \
calloc.o \
catgets.o \
catopen.o \
cfgetispeed.o \
cfgetospeed.o \
cfree.o \
cfsetispeed.o \
cfsetospeed.o \
cftime.o \
clock.o \
closedir.o \
closefrom.o \
confstr.o \
crypt.o \
csetlen.o \
ctime.o \
ctime_r.o \
deflt.o \
directio.o \
dirname.o \
div.o \
drand48.o \
dup2.o \
env_data.o \
err.o \
errno.o \
euclen.o \
event_port.o \
execvp.o \
fattach.o \
fdetach.o \
fdopendir.o \
fmtmsg.o \
ftime.o \
ftok.o \
ftw.o \
gcvt.o \
getauxv.o \
getcwd.o \
getdate_err.o \
getdtblsize.o \
getenv.o \
getexecname.o \
getgrnam.o \
getgrnam_r.o \
gethostid.o \
gethostname.o \
gethz.o \
getisax.o \
getloadavg.o \
getlogin.o \
getmntent.o \
getnetgrent.o \
getopt.o \
getopt_long.o \
getpagesize.o \
getpw.o \
getpwnam.o \
getpwnam_r.o \
getrusage.o \
getspent.o \
getspent_r.o \
getsubopt.o \
gettxt.o \
getusershell.o \
getut.o \
getutx.o \
getvfsent.o \
getwd.o \
getwidth.o \
getxby_door.o \
gtxt.o \
hsearch.o \
iconv.o \
imaxabs.o \
imaxdiv.o \
index.o \
initgroups.o \
insque.o \
isaexec.o \
isastream.o \
isatty.o \
killpg.o \
klpdlib.o \
l64a.o \
lckpwdf.o \
lconstants.o \
lexp10.o \
lfind.o \
lfmt.o \
lfmt_log.o \
llabs.o \
lldiv.o \
llog10.o \
lltostr.o \
localtime.o \
lsearch.o \
madvise.o \
malloc.o \
memalign.o \
mkdev.o \
mkdtemp.o \
mkfifo.o \
mkstemp.o \
mktemp.o \
mlock.o \
mlockall.o \
mon.o \
msync.o \
munlock.o \
munlockall.o \
ndbm.o \
nftw.o \
nlspath_checks.o \
nsparse.o \
nss_common.o \
nss_dbdefs.o \
nss_deffinder.o \
opendir.o \
opt_data.o \
perror.o \
pfmt.o \
pfmt_data.o \
pfmt_print.o \
plock.o \
poll.o \
posix_fadvise.o \
posix_fallocate.o \
posix_madvise.o \
posix_memalign.o \
priocntl.o \
privlib.o \
priv_str_xlate.o \
psiginfo.o \
psignal.o \
pt.o \
putpwent.o \
putspent.o \
raise.o \
rand.o \
random.o \
rctlops.o \
readdir.o \
readdir_r.o \
realpath.o \
reboot.o \
regexpr.o \
remove.o \
rewinddir.o \
rindex.o \
scandir.o \
seekdir.o \
select.o \
select_large_fdset.o \
setlabel.o \
setpriority.o \
settimeofday.o \
sh_locks.o \
sigflag.o \
siglist.o \
sigsend.o \
sigsetops.o \
ssignal.o \
stack.o \
str2sig.o \
strcase_charmap.o \
strcasecmp.o \
strcspn.o \
strdup.o \
strerror.o \
strlcat.o \
strlcpy.o \
strncasecmp.o \
strpbrk.o \
strsep.o \
strsignal.o \
strspn.o \
strstr.o \
strtod.o \
strtoimax.o \
strtok.o \
strtok_r.o \
strtoll.o \
strtoull.o \
strtoumax.o \
swab.o \
swapctl.o \
sysconf.o \
syslog.o \
tcdrain.o \
tcflow.o \
tcflush.o \
tcgetattr.o \
tcgetpgrp.o \
tcgetsid.o \
tcsendbreak.o \
tcsetattr.o \
tcsetpgrp.o \
tell.o \
telldir.o \
tfind.o \
time_data.o \
time_gdata.o \
truncate.o \
tsdalloc.o \
tsearch.o \
ttyname.o \
ttyslot.o \
ualarm.o \
ucred.o \
valloc.o \
vlfmt.o \
vpfmt.o \
waitpid.o \
walkstack.o \
wdata.o \
xgetwidth.o \
xpg4.o \
xpg6.o
PORTPRINT_W= \
doprnt_w.o
PORTPRINT= \
doprnt.o \
fprintf.o \
printf.o \
snprintf.o \
sprintf.o \
vfprintf.o \
vprintf.o \
vsnprintf.o \
vsprintf.o \
vwprintf.o \
wprintf.o
# c89 variants to support 32-bit size of c89 u/intmax_t (32-bit libc only)
PORTPRINT_C89= \
vfprintf_c89.o \
vprintf_c89.o \
vsnprintf_c89.o \
vsprintf_c89.o \
vwprintf_c89.o
PORTSTDIO_C89= \
vscanf_c89.o \
vwscanf_c89.o \
# portable stdio objects that contain large file interfaces.
# Note: fopen64 is a special case, as we build it small.
PORTSTDIO64= \
fopen64.o \
fpos64.o
PORTSTDIO_W= \
doscan_w.o
PORTSTDIO= \
__extensions.o \
_endopen.o \
_filbuf.o \
_findbuf.o \
_flsbuf.o \
_wrtchk.o \
clearerr.o \
ctermid.o \
ctermid_r.o \
cuserid.o \
data.o \
doscan.o \
fdopen.o \
feof.o \
ferror.o \
fgetc.o \
fgets.o \
fileno.o \
flockf.o \
flush.o \
fopen.o \
fpos.o \
fputc.o \
fputs.o \
fread.o \
fseek.o \
fseeko.o \
ftell.o \
ftello.o \
fwrite.o \
getc.o \
getchar.o \
getpass.o \
gets.o \
getw.o \
mse.o \
popen.o \
putc.o \
putchar.o \
puts.o \
putw.o \
rewind.o \
scanf.o \
setbuf.o \
setbuffer.o \
setvbuf.o \
system.o \
tempnam.o \
tmpfile.o \
tmpnam_r.o \
ungetc.o \
vscanf.o \
vwscanf.o \
wscanf.o
PORTI18N= \
__fgetwc_xpg5.o \
__fgetws_xpg5.o \
__fputwc_xpg5.o \
__fputws_xpg5.o \
__ungetwc_xpg5.o \
getwchar.o \
putwchar.o \
putws.o \
strtows.o \
wcsstr.o \
wcstoimax.o \
wcstol.o \
wcstoul.o \
wcswcs.o \
wmemchr.o \
wmemcmp.o \
wmemcpy.o \
wmemmove.o \
wmemset.o \
wscasecmp.o \
wscat.o \
wschr.o \
wscmp.o \
wscpy.o \
wscspn.o \
wsdup.o \
wslen.o \
wsncasecmp.o \
wsncat.o \
wsncmp.o \
wsncpy.o \
wspbrk.o \
wsprintf.o \
wsrchr.o \
wsscanf.o \
wsspn.o \
wstod.o \
wstok.o \
wstol.o \
wstoll.o \
wsxfrm.o \
gettext.o \
gettext_gnu.o \
gettext_real.o \
gettext_util.o \
plural_parser.o \
wdresolve.o \
_ctype.o \
isascii.o \
toascii.o
PORTI18N_COND= \
wcstol_longlong.o \
wcstoul_longlong.o
AIOOBJS= \
aio.o \
aio_alloc.o \
posix_aio.o
RTOBJS= \
clock_timer.o \
mqueue.o \
pos4obj.o \
sched.o \
sem.o \
shm.o \
sigev_thread.o
TPOOLOBJS= \
thread_pool.o
THREADSOBJS= \
alloc.o \
assfail.o \
cancel.o \
door_calls.o \
pthr_attr.o \
pthr_barrier.o \
pthr_cond.o \
pthr_mutex.o \
pthr_rwlock.o \
pthread.o \
rwlock.o \
scalls.o \
sema.o \
sigaction.o \
spawn.o \
synch.o \
tdb_agent.o \
thr.o \
thread_interface.o \
tls.o \
tsd.o
THREADSMACHOBJS= \
machdep.o
THREADSASMOBJS= \
asm_subr.o
UNICODEOBJS= \
u8_textprep.o \
uconv.o
UNWINDMACHOBJS= \
unwind.o
UNWINDASMOBJS= \
unwind_frame.o
# objects that implement the transitional large file API
PORTSYS64= \
fstatat64.o \
lockf64.o \
openat64.o
PORTSYS= \
_autofssys.o \
acctctl.o \
bsd_signal.o \
corectl.o \
exacctsys.o \
execl.o \
execle.o \
execv.o \
faccessat.o \
fsmisc.o \
fstatat.o \
getpagesizes.o \
getpeerucred.o \
inst_sync.o \
issetugid.o \
label.o \
libc_fcntl.o \
libc_link.o \
libc_open.o \
lockf.o \
lwp.o \
lwp_cond.o \
lwp_rwlock.o \
lwp_sigmask.o \
meminfosys.o \
msgsys.o \
nfssys.o \
openat.o \
pgrpsys.o \
posix_sigwait.o \
ppriv.o \
psetsys.o \
rctlsys.o \
sbrk.o \
semsys.o \
set_errno.o \
sharefs.o \
shmsys.o \
sidsys.o \
siginterrupt.o \
signal.o \
sigpending.o \
sigstack.o \
tasksys.o \
time.o \
time_util.o \
ucontext.o \
ustat.o \
zone.o
PORTREGEX= \
glob.o \
regcmp.o \
regex.o \
wordexp.o
MOSTOBJS= \
$(STRETS) \
$(CRTOBJS) \
$(DYNOBJS) \
$(FPOBJS) \
$(FPASMOBJS) \
$(ATOMICOBJS) \
$(XATTROBJS) \
$(COMOBJS) \
$(DTRACEOBJS) \
$(GENOBJS) \
$(PORTFP) \
$(PORTGEN) \
$(PORTGEN64) \
$(PORTI18N) \
$(PORTI18N_COND) \
$(PORTPRINT) \
$(PORTPRINT_C89) \
$(PORTPRINT_W) \
$(PORTREGEX) \
$(PORTSTDIO) \
$(PORTSTDIO64) \
$(PORTSTDIO_C89) \
$(PORTSTDIO_W) \
$(PORTSYS) \
$(PORTSYS64) \
$(AIOOBJS) \
$(RTOBJS) \
$(TPOOLOBJS) \
$(THREADSOBJS) \
$(THREADSMACHOBJS) \
$(THREADSASMOBJS) \
$(UNICODEOBJS) \
$(UNWINDMACHOBJS) \
$(UNWINDASMOBJS) \
$(COMSYSOBJS) \
$(SYSOBJS) \
$(COMSYSOBJS64) \
$(SYSOBJS64) \
$(VALUES)
TRACEOBJS= \
plockstat.o
# NOTE: libc.so.1 must be linked with the minimal crti.o and crtn.o
# modules whose source is provided in the $(SRC)/lib/common directory.
# This must be done because otherwise the Sun C compiler would insert
# its own versions of these modules and those versions contain code
# to call out to C++ initialization functions. Such C++ initialization
# functions can call back into libc before thread initialization is
# complete and this leads to segmentation violations and other problems.
# Since libc contains no C++ code, linking with the minimal crti.o and
# crtn.o modules is safe and avoids the problems described above.
OBJECTS= $(CRTI) $(MOSTOBJS) $(CRTN)
CRTSRCS= ../../common/i386
LDPASS_OFF= $(POUND_SIGN)
# include common library definitions
include ../../Makefile.lib
# NOTE: libc_i18n.a will be part of libc.so.1. Therefore, the compilation
# conditions such as the settings of CFLAGS and CPPFLAGS for the libc_i18n stuff
# need to be compatible with the ones for the libc stuff. Whenever the changes
# that affect the compilation conditions of libc happened, those for libc_i18n
# also need to be updated.
# we need to override the default SONAME here because we might
# be building a variant object (still libc.so.1, but different filename)
SONAME = libc.so.1
CFLAGS += $(CCVERBOSE) $(CTF_FLAGS)
# This is necessary to avoid problems with calling _ex_unwind().
# We probably don't want any inlining anyway.
XINLINE = -xinline=
CFLAGS += $(XINLINE)
# Setting THREAD_DEBUG = -DTHREAD_DEBUG (make THREAD_DEBUG=-DTHREAD_DEBUG ...)
# enables ASSERT() checking in the threads portion of the library.
# This is automatically enabled for DEBUG builds, not for non-debug builds.
THREAD_DEBUG =
$(NOT_RELEASE_BUILD)THREAD_DEBUG = -DTHREAD_DEBUG
# Make string literals read-only to save memory.
CFLAGS += $(XSTRCONST)
ALTPICS= $(TRACEOBJS:%=pics/%)
$(DYNLIB) := PICS += $(ROOTFS_LIBDIR)/libc_i18n.a
$(DYNLIB) := BUILD.SO = $(LD) -o $@ -G $(DYNFLAGS) $(PICS) $(ALTPICS) $(LDLIBS)
MAPFILES = ../port/mapfile-vers ../i386/mapfile-vers
#
# EXTN_CPPFLAGS and EXTN_CFLAGS set in enclosing Makefile
#
CFLAGS += $(EXTN_CFLAGS)
CPPFLAGS= -D_REENTRANT -Di386 $(EXTN_CPPFLAGS) $(THREAD_DEBUG) \
-I$(LIBCBASE)/inc -I../inc $(CPPFLAGS.master)
ASFLAGS= $(AS_PICFLAGS) -P -D__STDC__ -D_ASM $(CPPFLAGS) $(i386_AS_XARCH)
# Conditionally add support for making |wordexp()| check whether
# /usr/bin/ksh is ksh93 or not
include ../../../Makefile.ksh93switch
CPPFLAGS += -DWORDEXP_KSH93=$(ON_BUILD_KSH93_AS_BINKSH)
# Inform the run-time linker about libc specialized initialization
RTLDINFO = -z rtldinfo=tls_rtldinfo
DYNFLAGS += $(RTLDINFO)
DYNFLAGS += -e __rtboot
DYNFLAGS += $(EXTN_DYNFLAGS)
# Inform the kernel about the initial DTrace area (in case
# libc is being used as the interpreter / runtime linker).
DTRACE_DATA = -zdtrace=dtrace_data
DYNFLAGS += $(DTRACE_DATA)
# DTrace needs an executable data segment.
MAPFILE.NED=
BUILD.s= $(AS) $(ASFLAGS) $< -o $@
# Override this top level flag so the compiler builds in its native
# C99 mode. This has been enabled to support the complex arithmetic
# added to libc.
C99MODE= $(C99_ENABLE)
# libc method of building an archive
BUILD.AR= $(RM) $@ ; \
$(AR) q $@ `$(LORDER) $(MOSTOBJS:%=$(DIR)/%)| $(TSORT)`
# extra files for the clean target
CLEANFILES= \
../port/gen/errlst.c \
../port/gen/new_list.c \
assym.h \
genassym \
crt/_rtld.s \
crt/_rtbootld.s \
pics/_rtbootld.o \
pics/crti.o \
pics/crtn.o \
$(ALTPICS)
CLOBBERFILES += $(LIB_PIC)
# list of C source for lint
SRCS= \
$(ATOMICOBJS:%.o=$(SRC)/common/atomic/%.c) \
$(XATTROBJS:%.o=$(SRC)/common/xattr/%.c) \
$(COMOBJS:%.o=$(SRC)/common/util/%.c) \
$(DTRACEOBJS:%.o=$(SRC)/common/dtrace/%.c) \
$(PORTFP:%.o=../port/fp/%.c) \
$(PORTGEN:%.o=../port/gen/%.c) \
$(PORTI18N:%.o=../port/i18n/%.c) \
$(PORTPRINT:%.o=../port/print/%.c) \
$(PORTREGEX:%.o=../port/regex/%.c) \
$(PORTSTDIO:%.o=../port/stdio/%.c) \
$(PORTSYS:%.o=../port/sys/%.c) \
$(AIOOBJS:%.o=../port/aio/%.c) \
$(RTOBJS:%.o=../port/rt/%.c) \
$(TPOOLOBJS:%.o=../port/tpool/%.c) \
$(THREADSOBJS:%.o=../port/threads/%.c) \
$(THREADSMACHOBJS:%.o=../$(MACH)/threads/%.c) \
$(UNICODEOBJS:%.o=$(SRC)/common/unicode/%.c) \
$(UNWINDMACHOBJS:%.o=../port/unwind/%.c) \
$(FPOBJS:%.o=../$(MACH)/fp/%.c) \
$(LIBCBASE)/gen/ecvt.c \
$(LIBCBASE)/gen/makectxt.c \
$(LIBCBASE)/gen/siginfolst.c \
$(LIBCBASE)/gen/siglongjmp.c \
$(LIBCBASE)/gen/strcmp.c \
$(LIBCBASE)/gen/sync_instruction_memory.c \
$(LIBCBASE)/sys/ptrace.c \
$(LIBCBASE)/sys/uadmin.c
# conditional assignments
$(DYNLIB) := CRTI = crti.o
$(DYNLIB) := CRTN = crtn.o
# Files which need the threads .il inline template
TIL= \
aio.o \
alloc.o \
assfail.o \
atexit.o \
atfork.o \
cancel.o \
door_calls.o \
errno.o \
lwp.o \
ma.o \
machdep.o \
posix_aio.o \
pthr_attr.o \
pthr_barrier.o \
pthr_cond.o \
pthr_mutex.o \
pthr_rwlock.o \
pthread.o \
rand.o \
rwlock.o \
scalls.o \
sched.o \
sema.o \
sigaction.o \
sigev_thread.o \
spawn.o \
stack.o \
synch.o \
tdb_agent.o \
thr.o \
thread_interface.o \
thread_pool.o \
tls.o \
tsd.o \
unwind.o
THREADS_INLINES = $(LIBCBASE)/threads/i386.il
$(TIL:%=pics/%) := CFLAGS += $(THREADS_INLINES)
# pics/mul64.o := CFLAGS += $(LIBCBASE)/crt/mul64.il
# large-file-aware components that should be built large
$(COMSYSOBJS64:%=pics/%) := \
CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
$(SYSOBJS64:%=pics/%) := \
CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
$(PORTGEN64:%=pics/%) := \
CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
$(PORTSTDIO64:%=pics/%) := \
CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
$(PORTSYS64:%=pics/%) := \
CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
$(PORTSTDIO_W:%=pics/%) := \
CPPFLAGS += -D_WIDE
$(PORTPRINT_W:%=pics/%) := \
CPPFLAGS += -D_WIDE
$(PORTPRINT_C89:%=pics/%) := \
CPPFLAGS += -D_C89_INTMAX32
$(PORTSTDIO_C89:%=pics/%) := \
CPPFLAGS += -D_C89_INTMAX32
$(PORTI18N_COND:%=pics/%) := \
CPPFLAGS += -D_WCS_LONGLONG
.KEEP_STATE:
all: $(LIBS) $(LIB_PIC)
lint := CPPFLAGS += -I../$(MACH)/fp
lint := CPPFLAGS += -D_MSE_INT_H -D_LCONV_C99
lint := LINTFLAGS += -mn -erroff=E_SUPPRESSION_DIRECTIVE_UNUSED
lint:
@echo $(LINT.c) ...
@$(LINT.c) $(SRCS) $(LDLIBS)
$(LINTLIB):= SRCS=../port/llib-lc
$(LINTLIB):= CPPFLAGS += -D_MSE_INT_H
$(LINTLIB):= LINTFLAGS=-nvx
# object files that depend on inline template
$(TIL:%=pics/%): $(LIBCBASE)/threads/i386.il
# pics/mul64.o: $(LIBCBASE)/crt/mul64.il
# include common libc targets
include ../Makefile.targ
# We need to strip out all CTF and DOF data from the static library
$(LIB_PIC) := DIR = pics
$(LIB_PIC): pics $$(PICS)
$(BUILD.AR)
$(MCS) -d -n .SUNW_ctf $@ > /dev/null 2>&1
$(MCS) -d -n .SUNW_dof $@ > /dev/null 2>&1
$(AR) -ts $@ > /dev/null
$(POST_PROCESS_A)
$(LIBCBASE)/crt/_rtbootld.s: $(LIBCBASE)/crt/_rtboot.s $(LIBCBASE)/crt/_rtld.c
$(CC) $(CPPFLAGS) $(CTF_FLAGS) -O -S $(C_PICFLAGS) \
$(LIBCBASE)/crt/_rtld.c -o $(LIBCBASE)/crt/_rtld.s
$(CAT) $(LIBCBASE)/crt/_rtboot.s $(LIBCBASE)/crt/_rtld.s > $@
$(RM) $(LIBCBASE)/crt/_rtld.s
# partially built from C source
pics/_rtbootld.o: $(LIBCBASE)/crt/_rtbootld.s
$(AS) $(ASFLAGS) $(LIBCBASE)/crt/_rtbootld.s -o $@
$(CTFCONVERT_O)
ASSYMDEP_OBJS= \
_lwp_mutex_unlock.o \
_stack_grow.o \
getcontext.o \
tls_get_addr.o \
vforkx.o
$(ASSYMDEP_OBJS:%=pics/%) := CPPFLAGS += -I.
$(ASSYMDEP_OBJS:%=pics/%): assym.h
# assym.h build rules
GENASSYM_C = ../$(MACH)/genassym.c
# XXX A hack. Perhaps this should be 'CPPFLAGS.native' and
# live in Makefile.master
CPPFLAGS.genassym = \
$(ENVCPPFLAGS1) $(ENVCPPFLAGS2) $(ENVCPPFLAGS3) $(ENVCPPFLAGS4)
genassym: $(GENASSYM_C)
$(NATIVECC) -I$(LIBCBASE)/inc -I../inc \
-D__EXTENSIONS__ $(CPPFLAGS.genassym) -o $@ $(GENASSYM_C)
OFFSETS = ../$(MACH)/offsets.in
assym.h: $(OFFSETS) genassym
$(OFFSETS_CREATE) <$(OFFSETS) >$@
./genassym >>$@
# derived C source and related explicit dependencies
../port/gen/errlst.c + \
../port/gen/new_list.c: ../port/gen/errlist ../port/gen/errlist.awk
cd ../port/gen; pwd; $(AWK) -f errlist.awk < errlist
pics/errlst.o: ../port/gen/errlst.c
pics/new_list.o: ../port/gen/new_list.c