summaryrefslogtreecommitdiff
path: root/mk/buildlink3
AgeCommit message (Collapse)AuthorFilesLines
2005-02-17Revert previous. This breaks databases/postgresql74-lib for me on NetBSDseb1-3/+1
current.
2005-02-16Add ${BUILDLINK_VARS} to WRAPPER_VARS.seb1-1/+3
Since the bsd.wrapper.mk framework was introduced, hence the removal of BUILDLINK_VARS handling from bsd.buildlink3.mk, none of the variables listed in BUILDLINK_VARS were "cached" in any way.
2005-02-15The libtool wrapper should always do the compiler wrapper transformations,jlam1-1/+7
so move the setting for _WRAP_ARG_PP.LIBTOOL out of conditional areas of bsd.wrapper.mk and set it globally in bsd.buildlink3.mk with the rest of the libtool wrapper variables.
2004-12-01"the the" -> "the"wiz2-5/+5
2004-11-30Modify the way that the toolchain variables, e.g. CC, CPP, CXX, LD, etc.,jlam1-3/+3
are handled. The idea now is to simply remove the paths in the values of these variables, leaving behind only the basename plus any arguments, e.g.: CC= /usr/local/bin/gcc becomes CC= gcc CPP= /usr/local/bin/gcc -E becomes CPP= gcc -E The wrapper scripts are generated for every unique executable mentioned by the toolchain variables, so for the example above, only a "gcc" wrapper script is generated for ${CC} and ${CPP}. PKG_{CC,CPP,CXX,etc.} are the paths to the executables wrapped by the wrapper scripts. Note that it's now possible to set "CC" to something more than just the path to the compiler, e.g. CC= cc -ffast-math -funroll-loops -fomit-frame-pointer and the full value of ${CC} will be passed through via CONFIGURE_ENV and MAKE_ENV.
2004-11-28Remove pre-buildlink and post-buildlink as part of getting pkgsrc readyjlam1-11/+3
for pkgsrc-2004Q4. The "buildlink" phase was removed for the last branch, and this is the final cleanup. "post-buildlink" is now "post-wrapper".
2004-11-17Generalize BUILDLINK_AUTO_LIBS.<pkg> to BUILDLINK_AUTO_VARS.<pkg>,jlam1-19/+20
which is "yes" or "no" for whether the values of any of BUILDLINK_{CPPFLAGS,CFLAGS,LDFLAGS,LIBS}.<pkg> should be appended automatically to their respective variables.
2004-11-17BUILDLINK_AUTO_LIBS.<pkg> is "yes" or "no" for whether BUILDLINK_LIBS.<pkg>jlam1-6/+13
should automatically be appended to LIBS. It defaults to "yes".
2004-11-12Introduce LIBABISUFFIX for platforms which require ABI-dependant library paths.sketch1-7/+7
2004-11-12Add a new variable BUILDLINK_LIBS.<pkg> which contains a list of -l...jlam1-10/+32
options (library options) to be appended automatically to LIBS when building against <pkg>. LIBS is used by GNU configure scripts to note the library options that are automatically added to the link command line.
2004-11-10Allow BUILDLINK_BUILTIN_MK.<pkg> to point to the builtin.mk file for thejlam1-8/+10
specified package. This defaults to the builtin.mk file in the pkgsrc package directory.
2004-10-05Move the "dependency reduction" code from buildlink3 to bsd.pkg.mk sojlam1-55/+2
that all of pkgsrc can benefit from removing redundant dependencies. The code is encapsulated in a new file reduce-depends.mk which is included by bsd.pkg.mk after all dependencies have been specified.
2004-10-04When transforming from ${LOCALBASE} into ${BUILDLINK_DIR}, convertjlam1-9/+15
into the mangled name for ${BUILDLINK_DIR} as an intermediate step, then convert the mangled name into ${BUILDLINK_DIR} at the end. This avoids problems with too many substitutions when ${BUILDLINK_DIR} is a subdirectory of ${LOCALBASE}, as noted in PR pkg/27104.
2004-10-03Don't cache transformations of "-lfoo" into "rel/path/to/libfoo.la" becausejlam1-2/+2
"rel/path/to" can be different each time. This should fix problems with building transcode after the wrapper framework was integrated.
2004-09-30G/C _WRAPPER_SH.LIBTOOL which isn't needed (it's value was beingjlam1-13/+2
overwritten within bsd.wrapper.mk anyway). Also fix up the documentation surrounding that section. From Stoned Elipot in private email.
2004-09-24Teach the libtool wrapper about the "clean" and "uninstall" modes, wherejlam1-4/+7
we don't append the BUIDLINK_LDFLAGS to the commandline.
2004-09-24Create ${BUILDLINK_DIR}/bin for use by packages that need to drop off ajlam1-2/+5
buildlink wrapper for an installed binary or script.
2004-09-22Add a toggle that determines whether we pass extra arguments or not. Thisjlam2-5/+8
is intended to be toggled by a $scan file. Simplify buildlink3 by removing _BLNK_LIBTOOL_LDFLAGS and just setting _WRAP_EXTRA_ARGS.* like all of the other wrappers.
2004-09-21Initial commit of a new wrapper script framework that encapsulatesjlam29-2267/+881
the non-buildlink-related code and moves it out of mk/buildlink3 into mk/wrapper. The buildlink3 code is modified to simply hook its transformations into the wrapper script framework. The wrapper script framework has some new features: * Support automatically passing "ABI" flags to the compiler and linker depending on the value of ${ABI}. Currently supports the SunPro compiler with ${ABI} == 64 and the MIPSPro compiler with ${ABI} as any of 32, n32, o32, and 64. * making UnixWare GCC accept -rpath options and silently converting them into an appropriate LD_RUN_PATH * Add cmd-sink-interix-gcc and cmd-sink-interix-ld that errors out when it sees -fpic/-fPIC and -shared/-Bshareable, respectively (requested by <tv>). * Much improved debugging output. It's possible to output the wrapper work log in-line with normal output by setting WRAPPER_LOG to "stderr". Important differences in behaviour from the old buildlink3 code include: * Only move the -l options to the end of the command line, leaving the -L options in-place. * Extend the autodetection of the libtool mode to detect "compile" and "uninstall". * Fix problem noted in both PR pkg/24760 and PR pkg/25500, where -L/usr/lib/* was being mangled improperly. * Remove the top-level "buildlink" target; instead, make buildlinking occur as part of the "wrapper" target. * mangle and sub-mangle are only meant to transform directories in -I, -L, and rpath options, so remove the lines in buildlink3/gen-transform.sh that transformed bare directories. * Add the ability for the libtool wrapper to be called just to unwrap an existing libtool archive by running: libtool --mode=unwrap -o libfoo.la The old --fix-la syntax no longer works. 20040818 ======== * Initial release of a new wrapper script framework that encapsulates the non-buildlink-related code and moves it out of mk/buildlink3. These features include: * making MIPSpro accept GCC options * making MIPSpro "ucode" accept GCC options * making SunPro accept GCC options * making "ld" accept -Wl,* options and silently removing the "-Wl," * (NEW) making UnixWare GCC accept -rpath options and silently converting them into an appropriate LD_RUN_PATH One major benefit of this is that the buildlink3 code is now much tighter and easier to understand since it concerns itself solely with buildlink-related details. I haven't yet optimized the wrapper cache, so the new wrapper scripts may take slightly longer to execute than the old buildlink3 wrapper scripts, but I'll be improving this over time. 20040821 ======== * Move the inclusion of $cmd_sink outside of the main loop in wrapper.sh so that the $cmd_sink script can be used to globally scan and process the arguments. Move the LD_RUN_PATH code to a cmd-sink-unixware-gcc script. Garbage-collect the now unused export_vars-related code. * Add cmd-sink-aix-xlc for AIX xlc that munges -Wl,-R* into an appropriate -blibpath option. * Add cmd-sink-interix-gcc and cmd-sink-interix-ld that errors out when it sees -fpic/-fPIC and -shared/-Bshareable, respectively (requested by <tv>). * Move the code that converts full paths to shared libraries into the "-Ldir -llib" equivalents from the buildlink3 code into wrapper/logic. Remove the same from bsd.buildlink3.mk and gen-transform.sh. * Move the code that checks for absolute rpaths from the buildlink3 code into wrapper/arg-source. Remove the same from bsd.buildlink3.mk and gen-transform.sh. * Only move the -l options to the end of the command line, leaving the -L options in-place. * Add more debugging code. 20040824 ======== * Fix quoting problems after arguments are transformed. Remove the hack that was inserted that magically made almost everything work because we do it the right way now. * Move the inclusion of $logic outside of the main loop in wrapper.sh so that the $logic script doesn't have to worry about underflowing the argument buffer. * Encapsulate the loop in wrapper.sh that fills the argument buffer entirely within the arg-source script. * Move from the logic script into the arg-source script the transformations that merge or split arguments. * Fix bug where skipargs was effectively being ignored if it was more than 1. * Handle the whitespace in transformations in the logic script that turn one library option into multiple library options, e.g. "-lreadline" -> "-ledit -ltermcap". * Allow you to specify an environment variable WRAPPER_SKIP_TRANSFORM for whether you wish to skip the transformation step in the logic script. This is intended for testing purposes. * Added check_prog() and init_lib() functions to the shell code library to make it more reusable outside of the wrapper framework. * Allow the msg_log() function to output to "stdout" or "stderr". If you want to have all of the logging appear on the screen, then you can now set WRAPPER_LOG=stderr. * Make some of the script components not overridable on a per-wrapper basis. * Add a gen-transform.sh script that generates transformation sedfiles. The "transform" script is used to transform arguments, while the "untransform" script is used to unwrap files. Move the no-rpath logic from buildlink3/gen-transform.sh into wrapper/gen-transform.sh since it's not buildlink3-specific. * Check for a non-empty blibpath before adding the option in cmd-sink-aix-xlc. * Extend the autodetection of the libtool mode to detect "compile" and "uninstall". * Add a cmd-sink-libtool script that doesn't pass linker options to libtool unless we're in "link" mode. * Set _USE_RPATH to "yes" for UnixWare so that the wrappers will see the rpath options and convert them to a LD_RUN_PATH definition. * Add more debugging code. 20040826 ======== * Rewrite buildlink3/gen-transform.sh to produce more precise sed commands. Drop some unused commands from the mini-language, and add a few more that are more restrictive in their scope. * Fix problem where repeated options weren't properly handled by some of sed commands. It's not enough that they're "global replace", since some patterns match separator characters before and after each option. We must repeat those patterns twice to catch all instances correctly. * Fix problem noted in both PR pkg/24760 and PR pkg/25500, where -L/usr/lib/* was being mangled improperly. * Remove the top-level "buildlink" target; instead, make buildlinking occur as part of the "wrapper" target. * Add more debugging code. 20040828 ======== * Added a head_queue function to shell-lib that returns the head of the named queue without popping it off the front of the queue. * Strip consecutive, repeated library options from the command line when we read it in the logic script. * Be more careful about not underflowing the argument buffer. 20040906 ======== * shell-lib was moved into pkgsrc/mk/scripts; correct references to that file in the wrapper code. * Use opt-sub instead of sub-mangle when protecting -I/usr/include/* and -L/usr/lib/* from buildlink transformations. This avoids adding lines that look like "-I-I..." in the transformation sedfiles. * mangle and sub-mangle are only meant to transform directories in -I, -L, and rpath options, so remove the lines in buildlink3/gen-transform.sh that transformed bare directories. * Fix bug in strip-slashdot where the "." wasn't backquoted and thus matched all characters instead of only the "." character. * Change the libtool wrapper to use a modified buildcmd script that doesn't rearrange any of the arguments. This should fix spurious problems where libtool doesn't understand how to parse the command line when the -l options are moved to the end of the argument list. * Fix bug in the logic script where the $cachearg and $cachedarg weren't being properly set at all times, which caused the cache to contain the wrong transformed argument. 20040907 ======== * Support automatically passing "ABI" flags to the compiler and linker depending on the value of ${ABI}. Currently supports the SunPro compiler with ${ABI} == 64 and the MIPSPro compiler with ${ABI} as any of 32, n32, o32, and 64. * Move back the code that splits absolute paths to shared libraries from arg-source back into logic. This allows us to correctly skip splitting those paths based on the previous option. Also add a sanity check that the library name in the split argument doesn't contain a "/" since shell globs are not as precise as REs. * Don't transform the path given after --dynamic-linker (used by GNU ld for ELF linkage). * Add the ability for the libtool wrapper to be called just to unwrap an existing libtool archive by running: libtool --mode=unwrap -o libfoo.la 20040914 ======== * Add a loop in libtool-fix-la to ensure that all of the options listed in the dependency_libs lines of *.lai files are processed. This fixes a buildlink3 leakage bug. * Merge the gen-transform.sh scripts between buildlink3 and wrapper and place them all in wrapper. This makes sense since the commands simply allow for many types of transformations, which buildlink3 takes advantage of, but there is nothing inherently buildlink-ish about those commands. * Don't directly manipulate SUBST_SED.unwrap. Instead, create the value of SUBST_SED.unwrap by combining several other variables (currently just _UNWRAP_SED) to ensure that the correct ordering is preserved. * Correct some confusing debugging messages.
2004-09-08UNBUILDLINK_{PATTERNS,FILES} are actually no more, so garbage-collec themjlam1-6/+4
and update the documentation.
2004-09-07Use UNWRAP_{PATTERNS,FILES} instead of UNBUILDLINK_{PATTERNS,FILES}. Thisjlam1-3/+3
will help to minimize diffs for packages between the forthcoming pkgsrc-2004Q3 branch and the HEAD after the integration of the wrapper script framework.
2004-08-29Fix typo in comment, reported by Ryo HAYASAKA in PR 26797.wiz1-3/+3
2004-08-28Make "rename" a synonym for "S".jlam1-1/+4
2004-08-28Add "rm:opt" as a synonym for "S:opt:", and "rmdir:dir" for "r:dir".jlam1-2/+7
These are supported options from the soon-to-be-committed wrapper framework and are meant to more precisely state the intended transformation. Also just skip over unknown commands instead of generating an error.
2004-08-27Restore a default definition for _BLNK_RPATH_FLAGS lost in previous commit.jlam1-1/+2
2004-08-27Replace RPATH_FLAG with LINKER_RPATH_FLAG and COMPILER_RPATH_FLAG,jlam2-21/+12
which are the full option names used to set rpath directives for the linker and the compiler, respectively. In places were we are invoking the linker, use "${LINKER_RPATH_FLAG} <path>", where the space is inserted in case the flag is a word, e.g. -rpath. The default values of *_RPATH_FLAG are set by the compiler/*.mk files, depending on the compiler that you use. They may be overridden on a ${OPSYS}-specific basis by setting _OPSYS_LINKER_RPATH_FLAG and _OPSYS_COMPILER_RPATH_FLAG, respectively. Garbage-collect _OPSYS_RPATH_NAME and _COMPILER_LD_FLAG.
2004-08-13Add ${CAT} as the final pipeline command to BUILDLINK_FILES_CMD.<pkg> sojlam1-2/+2
that the whole pipeline returns 0. This avoids subtle breakage when the we use built-in software and there is actually no list of files passed as input to the pipeline, and the final egrep returns non-zero.
2004-08-13add some quoting to deal with the case where a file in a packagedmcmahill1-10/+10
has a space in the filename. Without the quoting the buildlink stage fails completely with errors. ok'ed by Johnny Lam.
2004-08-10Reorder the transformations in _BLNK_TRANSFORM so that commands tojlam1-14/+14
remove rpath options come first. This fixes problems we may encounter if ${_OPSYS_RPATH_NAME} is something surprising, like "-L". On Darwin, this was causing -L/usr/lib to be stripped out of "-Wl,-L/usr/lib", which left a bare "-Wl," on the command line.
2004-08-10In the rpath transformations, also handle -Wl,@_OPSYS_RPATH_NAME@... injlam1-1/+6
case ${_OPSYS_RPATH_NAME} is something surprising, like "-L".
2004-07-30Update documentation for the current state of buildlink3.jlam1-138/+2
2004-07-29Enable X11_TYPE=xorg now that we have the X.org packages on pkgsrc.xtraeme1-1/+2
2004-07-10explicitly don't transform "-Wl,*", fixing a bug that meant we weregrant1-1/+5
throwing away all -W arguments that weren't -Wl,-R. fixes building of a number of packages on Solaris.
2004-07-04Handle --execute the same way as --install (not modifying the arguments).wiz1-2/+2
Needed to convert inputmethods/xcin to bl3. Idea from jlam.
2004-07-04transform --export-dynamic to -G and strip -fstrict-prototypes.grant2-3/+13
2004-07-03update the cache for -staticgrant1-2/+2
2004-07-03fix typo and slight botch up in lastgrant1-3/+3
2004-07-03Convert -static to -Bstatic.salo1-1/+6
2004-06-22Remove references about BUILDLINK_UPDATE_CACHE in the configure stage,xtraeme1-6/+1
you could build packages faster right now (yay), I'm using this way around +2 months ago without any problem. Ok'ed by jlam@.
2004-06-13strip -fno-gnu-keywords argument to SunPro, and munge -pthread intogrant2-3/+13
-lpthread. ok'd by jlam. addresses PR pkg/24966 from Charlie Allom.
2004-06-04A couple packages (including the new boost) use "libfoo.so" as a directorytv1-11/+9
name -- this seems to be common among Jam-using packages. So, make sure to do the -L -l transform only if at the end of a word. This unfortunately doubles the number of regexes needed to match (one with $_sep, one with $). While here, though, the expressions for .so, .so.X, .so.X.Y, and .so.X.Y.Z can all be collapsed into only one set with the use of \(\.[0-9]\)*, so we actually end up with *less* regexes than before. :)
2004-06-04Append ${ABI} to some lib-dirs. This is a no-op on systems that do notjschauma1-7/+7
use ABI, but allows IRIX and particularly IRIX64 to find the correct libraries especially when linking against X11 libs. Tested over several months and multiple bulk-builds.
2004-05-17Garbage collect BUILDLINK_PKGBASE.<pkg> from buildlink3: it is not anymoreseb1-2/+1
used since revision 1.139 of mk/buildlink3/bsd.buildlink3.mk.
2004-05-17libtool archives don't start with '-', so don't match those, which arejlam2-4/+4
probably options to the compiler.
2004-05-08remove a word which shouldn't be there.grant1-3/+3
2004-04-26Define BLNK_RECMETHOD.${_pkg_} not only for full dependency but alsominskim1-2/+3
for build dependency. Also fix a related pasto. This fixes a malformed conditional error that occurs when a package in build dependency has BUILDLINK_RECOMMENDED.*. OK'ed by jmmv@.
2004-04-24Don't treat ${BUILDLINK_DIR} like a local directory in the "${WRKSRC} ==jlam2-4/+10
${WRKDIR}" case when converting references to local libtool archives into the full paths.
2004-04-24Create links to .pc files in BUILDLINK_DIR when building a pkgviewsminskim1-2/+2
package. OK'ed by jmmv@.
2004-04-22When substituting the location of a libtool archive, check to make suresnj1-2/+2
that the new one actually exists. Fixes PR pkg/25054.
2004-04-18Symlink *.idl into ${BUILDLINK_DIR}. This is needed for various gnomesnj1-2/+2
packages.