Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 18 Apr 2015 14:00:51 -0700
From:      Mark Millard <markmi@dsl-only.net>
To:        freebsd-ports@freebsd.org
Cc:        freebsd-toolchain@freebsd.org, FreeBSD PowerPC ML <freebsd-ppc@freebsd.org>
Subject:   Re: gcc-4.9.1/gcc/config/rs6000/freebsd64.h vs. FreeBSD's powerpc (non-64) L"..." and wchar_t (other gcc ports too?)
Message-ID:  <5994D629-964B-4394-B6DD-2C2D6907882F@dsl-only.net>
In-Reply-To: <3734A273-6178-4AF5-B066-DEEB6CFC7F1C@dsl-only.net>
References:  <5B228278-A967-46D4-8F56-08E47008D009@dsl-only.net> <3734A273-6178-4AF5-B066-DEEB6CFC7F1C@dsl-only.net>

next in thread | previous in thread | raw e-mail | index | archive | help
[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.



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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5994D629-964B-4394-B6DD-2C2D6907882F>