-
-
Notifications
You must be signed in to change notification settings - Fork 427
CI: Consider using more AC_REPLACE_FUNCS() #2830
Copy link
Copy link
Open
Labels
CIEntries related to continuous integration infrastructure (here CI = tools + scripts + recipes)Entries related to continuous integration infrastructure (here CI = tools + scripts + recipes)packagingportabilityWe want NUT to build and run everywhere possibleWe want NUT to build and run everywhere possiblerefactor/fightwarnPR or issue proposal to improve code maintainability without functional changes, or to fix warningsPR or issue proposal to improve code maintainability without functional changes, or to fix warnings
Milestone
Metadata
Metadata
Assignees
Labels
CIEntries related to continuous integration infrastructure (here CI = tools + scripts + recipes)Entries related to continuous integration infrastructure (here CI = tools + scripts + recipes)packagingportabilityWe want NUT to build and run everywhere possibleWe want NUT to build and run everywhere possiblerefactor/fightwarnPR or issue proposal to improve code maintainability without functional changes, or to fix warningsPR or issue proposal to improve code maintainability without functional changes, or to fix warnings
NUT sources include a number of fallback implementations of certain methods that not all target platforms provide on their own.
Ways to integrate those differ:
configure.acin theAC_REPLACE_FUNCS()method, causing autotools to generate the needed goals for missing code, and are listed asLTLIBOBJSmacro in that build circumstanceMakefile.amexplicitly, as a pattern likeThis issue is about investigating more about this, and perhaps simplify recipes where we needlessly re-invented a wheel we are already using elsewhere.
From work done in #2825/#2828 we know that
LTLIBOBJSshould be used carefully, as they are tacked into our helper libraries (mostly undercommon/) and it is very possible to end up including two libraries with competing (albeit identical) copies of the object code, or a library and object explicitly (when building a library).It may make sense to have a further helper library made of only
LTLIBOBJS(and maybe some dummy object so it is never empty) that all others can depend on, ensuring a single implementation as far as linker is concerned. This may be (or not be) coupled with #2097 to provide the strings fromnut_version.has that "dummy object".Maybe all other Makefiles have to be updated, so that library is linked into final programs and published libraries (static/shared) explicitly and on same level as other
libcommon*.lahelpers, and not through them (complicating the dependency and rebuild tree, and possibly re-introducing those linker conflicts).