[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freebsd-ppc
Subject:    Re: gcc-4.9.1/gcc/config/rs6000/freebsd64.h vs. FreeBSD's powerpc (non-64) L"..." and wchar_t (other
From:       Mark Millard <markmi () dsl-only ! net>
Date:       2015-04-18 21:00:51
Message-ID: 5994D629-964B-4394-B6DD-2C2D6907882F () dsl-only ! net
[Download RAW message or body]

[Looks like I'll soon be suspending my FreeBSD explorations for a time again. So this \
completes my notes for the subject and related material.]

Reminder of the "long int" issue in gcc-4.9.1/gcc/config/rs6000/freebsd64.h that gets \
the wrong type for L" . . . " notation for FreeBSD:

> /* rs6000.h gets this wrong for FreeBSD.  We use the GCC defaults instead.  */
> #undef WCHAR_TYPE
> #define WCHAR_TYPE      (TARGET_64BIT ? "int" : "long int")
> #undef  WCHAR_TYPE_SIZE
> #define WCHAR_TYPE_SIZE 32

I did try changing my \
/usr/obj/portswork/usr/ports/devel/powerpc64-gcc/work/gcc-4.9.1/gcc/config/rs6000/freebsd64.h \
so that WCHAR_TYPE would always use "int" and rebuilding powerpc64-gcc. With that I \
was able to compile lib32, no longer having a bad type for the L prefix notation on \
string literals.

So I expect that requesting a fix upstream and/or patching such files in gcc ports \
that have such a "long int" for powerpc FreeBSD targets is appropriate.


Side note likely specific to my context in some way . . .

Unfortunately that lib32 built did not mean that using it worked. A -g -m32 \
compile/link of

> int main()
> {
> return 0;
> }

produces something for which ./a.out segmentation faults in a way that neither the \
system nor the port gdb can report on where.

For now it looks like I'm not going to have the time to work on figuring out any of \
the issues involved.



===
Mark Millard
markmi at dsl-only.net

_______________________________________________
freebsd-ppc@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ppc
To unsubscribe, send any mail to "freebsd-ppc-unsubscribe@freebsd.org"


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic