On Thu, 2019-02-07 at 20:17 -0800, H. Peter Anvin wrote:> CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe. > > > On 2/7/19 1:53 PM, Joakim Tjernlund wrote: > \>>> > > > > -z muldefs would bloat the libraries unnecessarily, but worse it might > > > > mask real errors. > > > > > > Looking into the debian patches posted here I see that not using -z muldefs causes > > > bugs. I think you should just use muldefs and report the duplicated memset/memcpy syms > > > in gnu-efi as an bug as gnu-efi has no business defining these, its a lib. > > > > ehh, there a bug already. Created by me some time ago. Completely forgot about that :) > > Please chime in ... > > > > Seems to me that that is exactly the kind of thing a library should > provide...But not this library surely ? Looking at gnu-efi one can see that is is a workaround for gcc/MSVC and only for memcpy/memset : https://sourceforge.net/p/gnu-efi/code/ci/b1d426ce67cbeaa1a8ec7d9b8d0d8071ae4563b4/ I have suggested that gnu-efi should use weak syms for these.
> But not this library surely ? Looking at gnu-efi one can see that is is a workaround for gcc/MSVC > and only for memcpy/memset : > https://sourceforge.net/p/gnu-efi/code/ci/b1d426ce67cbeaa1a8ec7d9b8d0d8071ae4563b4/ > I have suggested that gnu-efi should use weak syms for these.Just an attempt to "keep it all together" (Nigel Croxon doesn't seem to be "connecting" the following first 2 items): _ "syslinux fails to build: multiple definition of `memset'", from Joakim Tjernlund, https://sf.net/p/gnu-efi/bugs/16/ _ "jmp_buf definition violates C standard", from hpa, https://sf.net/p/gnu-efi/bugs/17/ (and one additional item that _maybe_ has some kind of influence?...) _ "Add -ffreestanding to compiler flags", from David Woodhouse https://www.syslinux.org/archives/2018-August/026159.html Regards, Ady.
On 2/8/19 4:46 PM, Ady Ady via Syslinux wrote:>> But not this library surely ? Looking at gnu-efi one can see that is is a workaround for gcc/MSVC >> and only for memcpy/memset : >> https://sourceforge.net/p/gnu-efi/code/ci/b1d426ce67cbeaa1a8ec7d9b8d0d8071ae4563b4/ >> I have suggested that gnu-efi should use weak syms for these. > > Just an attempt to "keep it all together" (Nigel Croxon doesn't seem to > be "connecting" the following first 2 items): > > _ "syslinux fails to build: multiple definition of `memset'", from > Joakim Tjernlund, > https://sf.net/p/gnu-efi/bugs/16/ > > _ "jmp_buf definition violates C standard", from hpa, > https://sf.net/p/gnu-efi/bugs/17/ > > > (and one additional item that _maybe_ has some kind of influence?...) > _ "Add -ffreestanding to compiler flags", from David Woodhouse > https://www.syslinux.org/archives/2018-August/026159.html >This would probably help with gcc version compatibility, although at the cost of larger size. Syslinux is *not* a freestanding implementation; it has a full libc, so -ffreestanding *shouldn't* be necessary, except for floating point; I should see if we can build libpng floating point with -ffreestanding. -hpa