tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

-I/usr/include -L/usr/lib



Can anyone see any point in '-I/usr/include' being added to CPPFLAGS and
'-L/usr/lib ${COMPILER_RPATH_FLAG}/usr/lib' being added to LDFLAGS.

They are getting added because of builtin library's (e.g. dl pthread ...).

I don't see any need to have them added so I'd like to remove them with 
the following patch, any objections/comments?

-- 
Steven

Index: buildlink3/bsd.buildlink3.mk
===================================================================
RCS file: /srv/NetBSD-cvs/pkgsrc/mk/buildlink3/bsd.buildlink3.mk,v
retrieving revision 1.210
diff -u -p -r1.210 bsd.buildlink3.mk
--- buildlink3/bsd.buildlink3.mk        17 Jan 2012 22:19:22 -0000      1.210
+++ buildlink3/bsd.buildlink3.mk        19 Feb 2012 08:42:05 -0000
@@ -401,7 +401,7 @@ BUILDLINK_LIBS+=    ${_flag_}
 .  endif
 .  if !empty(BUILDLINK_INCDIRS.${_pkg_})
 .    for _dir_ in 
${BUILDLINK_INCDIRS.${_pkg_}:S/^/${BUILDLINK_PREFIX.${_pkg_}}\//}
-.      if exists(${_dir_})
+.      if exists(${_dir_}) && "${_dir_}" != "/usr/include"
 .        if empty(BUILDLINK_CPPFLAGS:M-I${_dir_})
 BUILDLINK_CPPFLAGS+=   -I${_dir_}
 .        endif
@@ -410,7 +410,7 @@ BUILDLINK_CPPFLAGS+=        -I${_dir_}
 .  endif
 .  if !empty(BUILDLINK_LIBDIRS.${_pkg_})
 .    for _dir_ in 
${BUILDLINK_LIBDIRS.${_pkg_}:S/^/${BUILDLINK_PREFIX.${_pkg_}}\//}
-.      if exists(${_dir_})
+.      if exists(${_dir_}) && "${_dir_}" != "/usr/lib"
 .        if empty(BUILDLINK_LDFLAGS:M-L${_dir_})
 BUILDLINK_LDFLAGS+=    -L${_dir_}
 .        endif
@@ -419,7 +419,7 @@ BUILDLINK_LDFLAGS+= -L${_dir_}
 .  endif
 .  if !empty(BUILDLINK_RPATHDIRS.${_pkg_})
 .    for _dir_ in 
${BUILDLINK_RPATHDIRS.${_pkg_}:S/^/${BUILDLINK_PREFIX.${_pkg_}}\//}
-.      if exists(${_dir_})
+.      if exists(${_dir_}) && "${_dir_}" != "/usr/lib"
 .        if empty(BUILDLINK_LDFLAGS:M${COMPILER_RPATH_FLAG}${_dir_})
 BUILDLINK_LDFLAGS+=    ${COMPILER_RPATH_FLAG}${_dir_}
 .        endif


Home | Main Index | Thread Index | Old Index