[m-dev.] test server
Zoltan Somogyi
zoltan.somogyi at runbox.com
Thu Apr 3 13:08:30 AEDT 2025
On Thu, 3 Apr 2025 12:52:02 +1100, Peter Wang <novalazy at gmail.com> wrote:
> Also, atomic_ops_sysdeps.S should only be required on Solaris/SPARC
> if using a compiler other than GCC (see where "need_atomic_ops_asm=true"
> is set in boehm_gc/configure.ac).
>
> > - add the missing .note.GNU-stack section to atomic_ops_sysdeps.S,
> > provided Boehm does not actually need executable stacks on SPARCs
> > (which I think is likely),
> >
> > - if Boehm does need executable stacks on SPARCs, we could add a
> > dummy definition to a new else arm of the #ifdef in that file,
> > which should fix the issue on non-SPARC systems if the only reason
> > for the warning is that ld is complaining about the *empty* .o file
> > missing that section, or
> >
> > - we could modify the makefile to include atomic_ops_sysdeps.S among
> > the list of source modules only if the condition of the #ifdef is true.
> > There is already a flag for that, NEED_ASM, but I don't see why its value
> > calls for the inclusion of atomic_ops_sysdeps.S; configure.ac should set it
> > only on Solaris hosts. But then, I have never used automake, so my reading
> > of Makefile.am is superficial.
>
> We don't run boehm_gc or libatomic_ops's configure scripts,
> or use any automake generated makefiles.
>
> We build boehm_gc using boehm_gc/Makefile.direct, which currently
> includes atomic_ops_sysdeps.o in the OBJS list unconditionally.
>
> I see a few options:
>
> 1. Filter out the warning from ld in our test setup. The warning will
> go away eventually. I've checked that Mercury binaries produced on
> various Linux distributions are not requiring executable stacks,
> so I don't think that's actually an issue.
>
> 2. Delete atomic_ops_sysdeps.o from OBJS in our fork of bdwgc.
> This might break builds for Solaris/SPARC with non-GCC compilers,
> if they were working at all. I expect we will hear zero complaints
> about it.
>
> 3. Introduce a variable in Makefile.direct in our fork of bdwgc
> that controls whether to include atomic_ops_sysdeps.o in OBJS,
> then make Mercury's configure script set that variable as required.
>
> Option 3 shouldn't be much harder than 2, but we won't be able to test
> it properly.
Option 1 gets rid of the warning, but unless I am wrong, still sets the stack
to be executable, which is bad.
I would vote for 3, with an announcement about the untested nature of the gc
on SPARCs. Since the issue is with SPARCs and not Solaris per se, and SPARC
machines can theoretically run other OSs, such as Illumos (the free Solaris fork)
and Linux, we would need README.SPARC.
As an aside, I would prefer having all the README.X files in a separate directory,
and not cluttering up the top level. Do other projects do this, and if so, is there
a standard convention? A DDG search for this info came up empty, but perhaps
you guys know the answer anyway.
Zoltan.
More information about the developers
mailing list