[BACK]Return to bsd.lib.mk CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / share / mk

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/share/mk/bsd.lib.mk between version 1.334 and 1.341

version 1.334, 2013/04/11 01:27:47 version 1.341, 2013/10/14 16:00:16
Line 47  CFLAGS+=        ${PIE_CFLAGS}
Line 47  CFLAGS+=        ${PIE_CFLAGS}
 AFLAGS+=        ${PIE_AFLAGS}  AFLAGS+=        ${PIE_AFLAGS}
 .endif  .endif
   
 .if (defined(MKDEBUG) && (${MKDEBUG} != "no")) || \  
     (defined(CFLAGS) && !empty(CFLAGS:M*-g*))  
 # We only add -g to the shared library objects  
 # because we don't currently split .a archives.  
 CSHLIBFLAGS+=   -g  
 .if ${LIBISPRIVATE} == "yes"  
 CFLAGS+=        -g  
 .endif  
 .endif  
   
   
 ##### Libraries that this may depend upon.  ##### Libraries that this may depend upon.
 .if defined(LIBDPLIBS) && ${MKPIC} != "no"                              # {  .if defined(LIBDPLIBS) && ${MKPIC} != "no"                              # {
 .for _lib _dir in ${LIBDPLIBS}  .for _lib _dir in ${LIBDPLIBS}
Line 140  SHLIB_FULLVERSION=${SHLIB_MAJOR}
Line 129  SHLIB_FULLVERSION=${SHLIB_MAJOR}
   
   
 # Set PICFLAGS to cc flags for producing position-independent code,  # Set PICFLAGS to cc flags for producing position-independent code,
 # if not already set.  Includes -DPIC, if required.  # if not already set.
   
 # Data-driven table using make variables to control how shared libraries  # Data-driven table using make variables to control how shared libraries
 # are built for different platforms and object formats.  # are built for different platforms and object formats.
Line 154  SHLIB_FULLVERSION=${SHLIB_MAJOR}
Line 143  SHLIB_FULLVERSION=${SHLIB_MAJOR}
 #                       with ELF, also set shared-lib version for ld.so.  #                       with ELF, also set shared-lib version for ld.so.
 # SHLIB_LDSTARTFILE:    support .o file, call C++ file-level constructors  # SHLIB_LDSTARTFILE:    support .o file, call C++ file-level constructors
 # SHLIB_LDENDFILE:      support .o file, call C++ file-level destructors  # SHLIB_LDENDFILE:      support .o file, call C++ file-level destructors
 # FPICFLAGS:            flags for ${FC} to compile .[fF] files to .pico objects.  
 # CPPPICFLAGS:          flags for ${CPP} to preprocess .[sS] files for ${AS}  
 # CPICFLAGS:            flags for ${CC} to compile .[cC] files to pic objects.  
 # CSHLIBFLAGS:          flags for ${CC} to compile .[cC] files to .pico objects.  
 #                       (usually includes ${CPICFLAGS})  
 # CAPICFLAGS:           flags for ${CC} to compiling .[Ss] files  
 #                       (usually just ${CPPPICFLAGS} ${CPICFLAGS})  
 # APICFLAGS:            flags for ${AS} to assemble .[sS] to .pico objects.  
   
 .if ${MACHINE_ARCH} == "alpha"                                          # {  
   
 FPICFLAGS ?= -fPIC  
 CPICFLAGS ?= -fPIC -DPIC  
 CPPPICFLAGS?= -DPIC  
 CAPICFLAGS?= ${CPPPICFLAGS} ${CPICFLAGS}  
 APICFLAGS ?=  
   
 .elif (${MACHINE_ARCH} == "sparc" || ${MACHINE_ARCH} == "sparc64")      # } {  
   
 # If you use -fPIC you need to define BIGPIC to turn on 32-bit  
 # relocations in asm code  
 FPICFLAGS ?= -fPIC  
 CPICFLAGS ?= -fPIC -DPIC  
 CPPPICFLAGS?= -DPIC -DBIGPIC  
 CAPICFLAGS?= ${CPPPICFLAGS} ${CPICFLAGS}  
 APICFLAGS ?= -KPIC  
   
 .else                                                                   # } {  
   
 # Platform-independent flags for NetBSD shared libraries  
 SHLIB_SOVERSION=${SHLIB_FULLVERSION}  
 SHLIB_SHFLAGS=  
 FPICFLAGS ?= -fPIC  
 CPICFLAGS?= -fPIC -DPIC  
 CPPPICFLAGS?= -DPIC  
 CAPICFLAGS?= ${CPPPICFLAGS} ${CPICFLAGS}  
 APICFLAGS?= -k  
   
 .endif                                                                  # }  PICFLAGS ?= -fPIC
   
 .if ${MKPICLIB} != "no"  .if ${MKPICLIB} != "no"
 CSHLIBFLAGS+= ${CPICFLAGS}  CSHLIBFLAGS+= ${PICFLAGS}
 .endif  .endif
   
 .if defined(CSHLIBFLAGS) && !empty(CSHLIBFLAGS)  .if defined(CSHLIBFLAGS) && !empty(CSHLIBFLAGS)
Line 204  MKSHLIBOBJS= yes
Line 156  MKSHLIBOBJS= yes
 MKSHLIBOBJS= no  MKSHLIBOBJS= no
 .endif  .endif
   
   .if (defined(MKDEBUG) && (${MKDEBUG} != "no")) || \
       (defined(CFLAGS) && !empty(CFLAGS:M*-g*))
   # We only add -g to the shared library objects
   # because we don't currently split .a archives.
   CSHLIBFLAGS+=   -g
   .if ${LIBISPRIVATE} == "yes"
   CFLAGS+=        -g
   .endif
   .endif
   
 # Platform-independent linker flags for ELF shared libraries  # Platform-independent linker flags for ELF shared libraries
 SHLIB_SOVERSION=        ${SHLIB_MAJOR}  SHLIB_SOVERSION=        ${SHLIB_MAJOR}
 SHLIB_SHFLAGS=          -Wl,-soname,${_LIB}.so.${SHLIB_SOVERSION}  SHLIB_SHFLAGS=          -Wl,-soname,${_LIB}.so.${SHLIB_SOVERSION}
 SHLIB_SHFLAGS+=         -Wl,--warn-shared-textrel  SHLIB_SHFLAGS+=         -Wl,--warn-shared-textrel
   .if !defined(SHLIB_MKMAP) || ${SHLIB_MKMAP} != "no"
   SHLIB_SHFLAGS+=         -Wl,-Map=${_LIB}.so.${SHLIB_SOVERSION}.map
   .endif
   CLEANFILES+=            ${_LIB}.so.${SHLIB_SOVERSION}.map
 SHLIB_LDSTARTFILE?=     ${_GCC_CRTI} ${_GCC_CRTBEGINS}  SHLIB_LDSTARTFILE?=     ${_GCC_CRTI} ${_GCC_CRTBEGINS}
 SHLIB_LDENDFILE?=       ${_GCC_CRTENDS} ${_GCC_CRTN}  SHLIB_LDENDFILE?=       ${_GCC_CRTENDS} ${_GCC_CRTN}
   
Line 318  LIBSTRIPSHLIBOBJS= yes
Line 284  LIBSTRIPSHLIBOBJS= yes
   
 .f.pico:  .f.pico:
         ${_MKTARGET_COMPILE}          ${_MKTARGET_COMPILE}
         ${COMPILE.f} ${FPICFLAGS} ${.IMPSRC} -o ${.TARGET}          ${COMPILE.f} ${PICFLAGS} ${.IMPSRC} -o ${.TARGET}
 .if defined(LIBSTRIPFOBJS)  .if defined(LIBSTRIPFOBJS)
         ${OBJCOPY} ${OBJCOPYLIBFLAGS} ${.TARGET}          ${OBJCOPY} ${OBJCOPYLIBFLAGS} ${.TARGET}
 .endif  .endif
Line 411  LIBSTRIPSHLIBOBJS= yes
Line 377  LIBSTRIPSHLIBOBJS= yes
   
 .s.pico:  .s.pico:
         ${_MKTARGET_COMPILE}          ${_MKTARGET_COMPILE}
         ${COMPILE.s} ${CAPICFLAGS} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}          ${COMPILE.s} ${PICFLAGS} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
 .if defined(LIBSTRIPAOBJS)  .if defined(LIBSTRIPAOBJS)
         ${OBJCOPY} ${OBJCOPYLIBFLAGS} ${.TARGET}          ${OBJCOPY} ${OBJCOPYLIBFLAGS} ${.TARGET}
 .endif  .endif
   
 .S.pico:  .S.pico:
         ${_MKTARGET_COMPILE}          ${_MKTARGET_COMPILE}
         ${COMPILE.S} ${CAPICFLAGS} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}          ${COMPILE.S} ${PICFLAGS} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
 .if defined(LIBSTRIPAOBJS)  .if defined(LIBSTRIPAOBJS)
         ${OBJCOPY} ${OBJCOPYLIBFLAGS} ${.TARGET}          ${OBJCOPY} ${OBJCOPYLIBFLAGS} ${.TARGET}
 .endif  .endif
Line 623  DPLIBC ?= ${DESTDIR}${LIBC_SO}
Line 589  DPLIBC ?= ${DESTDIR}${LIBC_SO}
 .endif  .endif
 .else  .else
 LDLIBC ?= -nodefaultlibs  LDLIBC ?= -nodefaultlibs
 .if ${LIB} == "c"  .if ${HAVE_LIBGCC} == "yes" && ${LIB} == "c"
 LDADD+= -lgcc  LDADD+= -lgcc
 .endif  .endif
 .endif  .endif
Line 631  LDADD+= -lgcc
Line 597  LDADD+= -lgcc
   
 .if ${LIBISCXX} != "no"  .if ${LIBISCXX} != "no"
 LIBCC:= ${CXX}  LIBCC:= ${CXX}
   . if ${MKLIBCXX} == "yes"
   LIBDPLIBS+=     c++     ${.CURDIR}/../../../../../external/bsd/libc++/lib
   . elif ${HAVE_GCC} == 4
   LIBDPLIBS+=     stdc++  ${.CURDIR}/../../../../../gnu/lib/libstdc++-v3_4
   . else
   LIBDPLIBS+=     stdc++  ${.CURDIR}/../../../../../external/gpl3/gcc/lib/libstdc++-v3
   . endif
 .else  .else
 LIBCC:= ${CC}  LIBCC:= ${CC}
 .endif  .endif

Legend:
Removed from v.1.334  
changed lines
  Added in v.1.341

CVSweb <webmaster@jp.NetBSD.org>