diff --git a/build/org.eclipse.cdt.managedbuilder.gnu.ui/META-INF/MANIFEST.MF b/build/org.eclipse.cdt.managedbuilder.gnu.ui/META-INF/MANIFEST.MF
index 37bf4207ca8..3e3ce86f60e 100644
--- a/build/org.eclipse.cdt.managedbuilder.gnu.ui/META-INF/MANIFEST.MF
+++ b/build/org.eclipse.cdt.managedbuilder.gnu.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.cdt.managedbuilder.gnu.ui; singleton:=true
-Bundle-Version: 8.5.300.qualifier
+Bundle-Version: 8.6.0.qualifier
Bundle-Activator: org.eclipse.cdt.managedbuilder.gnu.ui.GnuUIPlugin
Bundle-Vendor: %providerName
Bundle-Localization: plugin
diff --git a/build/org.eclipse.cdt.managedbuilder.gnu.ui/plugin.properties b/build/org.eclipse.cdt.managedbuilder.gnu.ui/plugin.properties
index 38fc09bf213..46816164969 100644
--- a/build/org.eclipse.cdt.managedbuilder.gnu.ui/plugin.properties
+++ b/build/org.eclipse.cdt.managedbuilder.gnu.ui/plugin.properties
@@ -1,5 +1,5 @@
###############################################################################
-# Copyright (c) 2005, 2010 Texas Instruments Inc. and others.
+# Copyright (c) 2005, 2023 Texas Instruments Inc. and others.
#
# This program and the accompanying materials
# are made available under the terms of the Eclipse Public License 2.0
@@ -11,6 +11,7 @@
# Contributors:
# Texas Instruments Inc. - initial API and implementation
# IBM Corporation
+# John Dallaway - add library grouping option (#608)
###############################################################################
# plugin names
@@ -208,6 +209,7 @@ Option.Posix.Linker.Strip.debug=Omit debug symbol information (-S)
Option.Posix.Linker.Static=No shared libraries (-static)
Option.Posix.Linker.XLinker=Other options (-Xlinker [option])
Option.Posix.Linker.Flags=Linker flags
+Option.Posix.Linker.GroupLibs=Group libraries (-Wl,--start-group ... -Wl,--end-group)
Option.Posix.Libs=Libraries (-l)
Option.Posix.Libsearch=Library search path (-L)
Option.Posix.UserObjs=Other objects
diff --git a/build/org.eclipse.cdt.managedbuilder.gnu.ui/plugin.xml b/build/org.eclipse.cdt.managedbuilder.gnu.ui/plugin.xml
index 8d23e329f03..ffe0f09fbfd 100644
--- a/build/org.eclipse.cdt.managedbuilder.gnu.ui/plugin.xml
+++ b/build/org.eclipse.cdt.managedbuilder.gnu.ui/plugin.xml
@@ -83,6 +83,7 @@
name="%Option.Posix.Libs"
category="gnu.c.link.category.libs"
command="-l"
+ commandGenerator="org.eclipse.cdt.managedbuilder.gnu.ui.LibrariesCommandGenerator"
id="gnu.c.link.option.libs"
browseType="none"
valueType="libs">
@@ -95,6 +96,13 @@
browseType="directory"
valueType="libPaths">
+
command + lib)
+ .collect(Collectors.joining(" ")); //$NON-NLS-1$
+ if (!libraries.isEmpty()) {
+ libraries = CdtVariableResolver.resolveToString(libraries, macroSubstitutor);
+ return String.format(GROUP_LIBRARIES_COMMAND_FORMAT, libraries);
+ }
+ }
+ } catch (BuildException | CdtVariableException e) {
+ Platform.getLog(getClass()).log(Status.error("Error generating libraries command", e)); //$NON-NLS-1$
+ }
+ return null; // fallback to default command generator
+ }
+
+}