pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: way to force using i686... on pkg-config?



On Sat, 22 Jan 2022 at 15:28, Boyd Lynn Gerber <gerberb%zenez.com@localhost> wrote:
>
> On Saturday 2022-01-22 12:51, David Brownlee wrote:
>
> > On Fri, 21 Jan 2022 at 17:48, Boyd Lynn Gerber <gerberb%zenez.com@localhost> wrote:
> >>
> >> I can't seem to get past this issue natively I build using
> >>
> >> host='i686-unknown-sysv5UnixWare7.1.4'
> >> host_alias='i686-unknown-sysv5UnixWare7.1.4'
> >>
> >> This is what I am seeing.
> >>
> >> checking for lock-free atomic intrinsics... configure: error: GLib must
> >> be build with -march=i486 or later.
> >> configure: error: ./configure failed for glib
> >> *** Error code 1
> >
> > OK, this is due to the following failing to compile/run (whitespace
> > compacted for email)
> >
> > int main () {
> > volatile int atomic = 2;
> > __sync_bool_compare_and_swap (&atomic, 2, 3);;
> > return 0;
> > }
>
> > gcc /tmp/swaptest.c && ./a.out && echo OK
>
> $ gcc /tmp/swaptest.c && ./a.out && echo OK
> /var/tmp//ccLlWqFA.o: In function `main':
> swaptest.c:(.text+0x24): undefined reference to
> `__sync_bool_compare_and_swap_4'
> collect2: error: ld returned 1 exit status
>
> > gcc -march=i486 /tmp/swaptest.c && ./a.out && echo OK
>
> $ gcc -march=i486 /tmp/swaptest.c && ./a.out && echo OK
> OK
>
> > gcc -march=i686 /tmp/swaptest.c && ./a.out && echo OK
>
> $ gcc -march=i686 /tmp/swaptest.c && ./a.out && echo OK
> OK
>
> Regards,

OK, so your gcc is defaulting to targeting less than i486.

Assuming you do not care about actual i386 CPUs :) :), if its a gcc
you have built specifically then I would suggest rebuilding it to just
default to i686 or whatever level you choose, otherwise pkgsrc needs
to be told to add march=i686 or similar to all usages...

David


Home | Main Index | Thread Index | Old Index