bug#54020: Allow user-defined libtool options
Mike Frysinger <[email protected]> Sat, 13 Jan 2024 20:06:00 -0500
| Newsgroups | gmane.comp.sysutils.automake.bugs,gmane.comp.sysutils.automake.patches |
|---|---|
| Message-ID | <ZaMzePo5trTXL-aX@vapier> |
On 13 Jan 2024 22:29, Bogdan wrote: > Mike Frysinger <[email protected]>, 2024-01-13 07:19: > > On 15 Mar 2023 17:31, Bogdan wrote: > >> Another patch from my side. This one makes it possible for users to > >> pass additional options to libtool in 'compile' mode. Fixes #54020. > >> > >> Added documentation and a test case including the '-no-suppress' > >> option. All tests with 'lt' or 'libtool' in the name pass. > >> > >> Feel free to rename the variables, I just came up with the names > >> LTCOMPILE_PREFLAGS and LTCOMPILE_POSTFLAGS, reflecting the positions > >> where the variables are put and the mode they're used in. > > > > why do we need LTCOMPILE_POSTFLAGS ? isn't that just after the compile > > command ? $obj_compile expands into e.g. > > \$(CC) @cpplike_flags \$(AM_CFLAGS) \$(CFLAGS) > > > > so if someone wants to add flags to C/etc..., they already have knobs > > to turn. > > > > which means this would simplify by only having one variable right ? > > AM_LTCOMPILE_FLAGS > > Seems so, at least for now. At least for C compilers. At least until > $obj_compile becomes something else in the future or something more, > or even now contains (or will contain) other options after $(CFLAGS) > on the command line when using other compilers. > For simplicity - yes, one flag like AM_LTCOMPILE_FLAGS should > suffice, at least now, as it seems. I've made pre- and post- flags for > better flexibility, to be future-proof. i don't see there ever being a future need here. libtool's design is that it stops processing after the first non-argument after --mode=compile, and everything else is a wrapped command which libtool blindly executes. those commands should have their own set of flags, and libtool is irrelevant at that point, so giving it a libtool-centric name that is used regardless of the wrapped command will never make sense. -mike
signature.asc
(application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEuQK1JxMl+JKsJRrUQWM7n+g39YEFAmWjM3gACgkQQWM7n+g3 9YF5yQ//ZFNs/P4zZpq9FJuaIAd0GeI6lVHw0C+aJEh4ktaEfhx/NU2DgkKvKFzX OxFLNi9/0Ed+XqtHsN3C6LhXPMy9Se5qJP0x0E+hjmyDWu7zi+vprcLMJ4AF5Ecq idBQg9c3s7ngkiYWkzMxkfzomLpXoPNuAwyXRjSqZdG94+azeoo5roWUwsVovqTQ lOGfJxvt4eP7Qjsdw1zLzaNp4XJZBv+G/cS8M66Z5BIMlcIvsBzz9RbGDirlkpAV eivp4zJE/ah3vttclieIZzUFfua4NIlLdXvMKwPbYAlqAEccbiX0SqHeRJyczp2t r0SnSTruF1FeCyEtWVGXVQPtnyjrsW9wxNlLtYMqQryUBuo5X0UUQpvLsmB5iKkL ZDKW8BDzJeNhpMPnWz05m5NHSU+k+wVJWT7cXlHoz00K3T4HdxwQ4G9nPQ0SGQwh D0rwtf7MJwQCR8NjuWaArFIo15QDwxQUUQ2HiqOaaxQiyYkLmdfp8ZRE56ZTjLhO yfp1aDTZIwKKU9/wkNJ92y3hTnpJQsXYKGDN2q6zm0DvJa7ixKrgwJOlXA1Vd/6Z gMV/2GUA6ZIVYPJgCduxP8E7sudLeCIUVzt+eJUogs52R65NwKy8181mQREt3aA6 25ho1+QyaHAd2RsxeHrHWyb5aZDr4ZhB3HnF9tzjJQfbn3oZtHc= =oXLV -----END PGP SIGNATURE-----