On Fri, Mar 25, 2022 at 10:04:24AM +0100, Robert Nagy wrote: > Hi > > Our cmake has some hacks and due to that we cannot build binaries that > link to libraries with an OBJECT type because that means that all the object > files are pulled instead of linking to a static library. e.g.: > > Source/WTF/wtf/CMakeFiles/WTF.dir/./ApproximateTime.cpp.o > > But our cmake code modifies that to be -lApproximateTime.cpp.o which will > fail obviously. > > The following hack on top of our hack fixes the issue. aja@ is running a bulk > wit this already:
Survived a bulk. ok aja@ > > Index: Makefile > =================================================================== > RCS file: /cvs/ports/devel/cmake/Makefile,v > retrieving revision 1.206 > diff -u -p -u -r1.206 Makefile > --- Makefile 18 Mar 2022 21:05:31 -0000 1.206 > +++ Makefile 23 Mar 2022 16:07:03 -0000 > @@ -6,7 +6,7 @@ VER = 3.20.3 > EPOCH = 0 > DISTNAME = cmake-${VER} > CATEGORIES = devel > -REVISION = 5 > +REVISION = 6 > > HOMEPAGE = https://www.cmake.org/ > > Index: patches/patch-Source_cmComputeLinkInformation_cxx > =================================================================== > RCS file: > /cvs/ports/devel/cmake/patches/patch-Source_cmComputeLinkInformation_cxx,v > retrieving revision 1.29 > diff -u -p -u -r1.29 patch-Source_cmComputeLinkInformation_cxx > --- patches/patch-Source_cmComputeLinkInformation_cxx 11 Mar 2022 18:49:50 > -0000 1.29 > +++ patches/patch-Source_cmComputeLinkInformation_cxx 23 Mar 2022 16:07:03 > -0000 > @@ -12,7 +12,7 @@ Index: Source/cmComputeLinkInformation.c > > this->OrderRuntimeSearchPath->SetImplicitDirectories(this->ImplicitLinkDirs); > if (this->OrderDependentRPath) { > > this->OrderDependentRPath->SetImplicitDirectories(this->ImplicitLinkDirs); > -@@ -713,10 +714,16 @@ void cmComputeLinkInformation::AddItem(BT<std::string> > +@@ -713,10 +714,20 @@ void cmComputeLinkInformation::AddItem(BT<std::string> > // This is a directory. > this->DropDirectoryItem(item.Value); > } else { > @@ -25,14 +25,18 @@ Index: Source/cmComputeLinkInformation.c > + this->AddFullItem(item); > + this->AddLibraryRuntimeInfo(item.Value); > + } else { > -+ std::string file = cmSystemTools::GetFilenameName(item.Value); > -+ this->AddUserItem(file, false); > ++ if (cmHasLiteralSuffix(item.Value, ".o")) > ++ this->AddFullItem(item); > ++ else { > ++ std::string file = cmSystemTools::GetFilenameName(item.Value); > ++ this->AddUserItem(file, false); > ++ } > + this->OrderLinkerSearchPath->AddLinkLibrary(item.Value); > + } > } > } else { > // This is a library or option specified by the user. > -@@ -1049,11 +1056,18 @@ void > cmComputeLinkInformation::AddTargetItem(BT<std::s > +@@ -1049,11 +1060,18 @@ void > cmComputeLinkInformation::AddTargetItem(BT<std::s > this->SharedLibrariesLinked.insert(target); > } > > @@ -55,7 +59,7 @@ Index: Source/cmComputeLinkInformation.c > } > > // For compatibility with CMake 2.4 include the item's directory in > -@@ -1066,6 +1080,27 @@ void cmComputeLinkInformation::AddTargetItem(BT<std::s > +@@ -1066,6 +1084,27 @@ void cmComputeLinkInformation::AddTargetItem(BT<std::s > > // Now add the full path to the library. > this->Items.emplace_back(item, true, target); > -- Antoine