Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Apr 2017 16:59:58 -0400
From:      Jung-uk Kim <jkim@FreeBSD.org>
To:        papowell@astart.com, freebsd-stable@freebsd.org
Subject:   Re: GCC + FreeBSD 11.0 Stable - stat.h does not have vm_ooffset_t definition
Message-ID:  <f264ebcc-4cd4-4541-f19d-227cde74b3ba@FreeBSD.org>
In-Reply-To: <39149f1c-d939-5c60-a0c3-ab76fa0f750b@astart.com>
References:  <8316fd8e-056d-32a1-1e59-414269476190@astart.com> <95c6f08e-0cf7-f0f3-8b19-29e03b3f4f96@FreeBSD.org> <39149f1c-d939-5c60-a0c3-ab76fa0f750b@astart.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--20U8vtaF2eFkW8c0knqlgdEtNAncnIg9P
Content-Type: multipart/mixed; boundary="7xg6ooNt9sonNaaSo15Rct8tX4OsdrTC8";
 protected-headers="v1"
From: Jung-uk Kim <jkim@FreeBSD.org>
To: papowell@astart.com, freebsd-stable@freebsd.org
Message-ID: <f264ebcc-4cd4-4541-f19d-227cde74b3ba@FreeBSD.org>
Subject: Re: GCC + FreeBSD 11.0 Stable - stat.h does not have vm_ooffset_t
 definition
References: <8316fd8e-056d-32a1-1e59-414269476190@astart.com>
 <95c6f08e-0cf7-f0f3-8b19-29e03b3f4f96@FreeBSD.org>
 <39149f1c-d939-5c60-a0c3-ab76fa0f750b@astart.com>
In-Reply-To: <39149f1c-d939-5c60-a0c3-ab76fa0f750b@astart.com>

--7xg6ooNt9sonNaaSo15Rct8tX4OsdrTC8
Content-Type: multipart/mixed;
 boundary="------------7F7188C1338381177808DEE5"
Content-Language: en-US

This is a multi-part message in MIME format.
--------------7F7188C1338381177808DEE5
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

On 04/27/2017 12:45, Patrick Powell wrote:
> On 04/26/17 09:34, Jung-uk Kim wrote:
>> On 04/26/2017 10:14, Patrick Powell wrote:
>>> First: a big thank-you to the support/fixit people for all of their w=
ork!
>>>
>>> I was doing some testing using FreeBSD 11.0-STABLE and some of my
>>> configure scripts died.  However, they were working fine on FreeBSD 1=
1.0
>>> RELEASE.
>>>
>>> I found the problem,  but I do not know how to resolve this.  When yo=
u
>>> install the GCC compiler from the PKG repository it appears to create=
 a
>>> modified set of include files from the system (default?) include file=
s
>>> (/usr/include).  However, when the modified /usr/include/sys/types.h
>>> file is created, the typedef for vm_ooffset_t is modified,  and there=
 is
>>> no reference to __vm_ooffset_t that the compiler can resolve.
>>>
>>> < typedef       __int64_t       vm_ooffset_t;
>>> ---
>>>> typedef       __vm_ooffset_t  vm_ooffset_t;
>> ...
>> You have to rebuild lang/gcc from the ports tree to fix this problem.
>>
>> https://lists.freebsd.org/pipermail/freebsd-current/2017-February/0649=
37.html
>>
>> Jung-uk Kim
>>
> Does this mean that the GCC port/package needs to be updated?  If so,=20
> should I file a PR report on this issue?
> I (temporarily) fixed this problem by hand editting the modified types.=
h
> file and things seem to work.

I already wrote a patch (attached). :-)

Jung-uk Kim

--------------7F7188C1338381177808DEE5
Content-Type: text/x-patch;
 name="lang_gcc.diff"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
 filename="lang_gcc.diff"

Index: lang/gcc/files/patch-fixincludes_fixincl.x
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- lang/gcc/files/patch-fixincludes_fixincl.x	(nonexistent)
+++ lang/gcc/files/patch-fixincludes_fixincl.x	(working copy)
@@ -0,0 +1,78 @@
+--- fixincludes/fixincl.x.orig	2016-02-01 20:25:12 UTC
++++ fixincludes/fixincl.x
+@@ -15,7 +15,7 @@
+  * certain ANSI-incompatible system header files which are fixed to wor=
k
+  * correctly with ANSI C and placed in a directory that GNU C will sear=
ch.
+  *
+- * This file contains 231 fixup descriptions.
++ * This file contains 232 fixup descriptions.
+  *
+  * See README for more information.
+  *
+@@ -9480,14 +9480,43 @@ static const char* apzX11_SprintfPatch[] =3D {
+ #endif /* !defined __STDC__ */",
+     (char*)NULL };
+=20
++/* * * * * * * * * * * * * * * * * * * * * * * * * *
++ *
++ *  Description of Freebsd_Sys_Types fix
++ */
++tSCC zFreebsd_Sys_TypesName[] =3D
++     "freebsd_sys_types";
+=20
++/*
++ *  File name selection pattern
++ */
++tSCC zFreebsd_Sys_TypesList[] =3D
++  "sys/types.h\0";
++/*
++ *  Machine/OS name selection pattern
++ */
++tSCC* apzFreebsd_Sys_TypesMachs[] =3D {
++        "*-*-freebsd*",
++        (const char*)NULL };
++#define FREEBSD_SYS_TYPES_TEST_CT  0
++#define aFreebsd_Sys_TypesTests   (tTestDesc*)NULL
++
++/*
++ *  Fix Command Arguments for Freebsd_Sys_Types
++ */
++static const char* apzFreebsd_Sys_TypesPatch[] =3D { sed_cmd_z,
++    "-e", "s/^typedef\t__vm_ooffset_t\t/typedef\t__int64_t\t/",
++    "-e", "s/^typedef\t__vm_pindex_t\t/typedef\t__uint64_t\t/",
++    (char*)NULL };
++
++
+ /* * * * * * * * * * * * * * * * * * * * * * * * * *
+  *
+  *  List of all fixes
+  */
+ #define REGEX_COUNT          268
+ #define MACH_LIST_SIZE_LIMIT 187
+-#define FIX_COUNT            231
++#define FIX_COUNT            232
+=20
+ /*
+  *  Enumerate the fixes
+@@ -9723,7 +9752,8 @@ typedef enum {
+     X11_CLASS_FIXIDX,
+     X11_CLASS_USAGE_FIXIDX,
+     X11_NEW_FIXIDX,
+-    X11_SPRINTF_FIXIDX
++    X11_SPRINTF_FIXIDX,
++    FREEBSD_SYS_TYPES_FIXIDX
+ } t_fixinc_idx;
+=20
+ tFixDesc fixDescList[ FIX_COUNT ] =3D {
+@@ -10880,5 +10910,10 @@ tFixDesc fixDescList[ FIX_COUNT ] =3D {
+   {  zX11_SprintfName,    zX11_SprintfList,
+      apzX11_SprintfMachs,
+      X11_SPRINTF_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
+-     aX11_SprintfTests,   apzX11_SprintfPatch, 0 }
++     aX11_SprintfTests,   apzX11_SprintfPatch, 0 },
++
++  {  zFreebsd_Sys_TypesName,    zFreebsd_Sys_TypesList,
++     apzFreebsd_Sys_TypesMachs,
++     FREEBSD_SYS_TYPES_TEST_CT, FD_MACH_ONLY,
++     aFreebsd_Sys_TypesTests,   apzFreebsd_Sys_TypesPatch, 0 }
+ };

Property changes on: lang/gcc/files/patch-fixincludes_fixincl.x
___________________________________________________________________
Added: fbsd:nokeywords
## -0,0 +1 ##
+yes
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property

--------------7F7188C1338381177808DEE5--

--7xg6ooNt9sonNaaSo15Rct8tX4OsdrTC8--

--20U8vtaF2eFkW8c0knqlgdEtNAncnIg9P
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEl1bqgKaRyqfWXu/CfJ+WJvzb8UYFAlkCW84ACgkQfJ+WJvzb
8UaD5wf7B5O/e8RtWDTkPBMbhURa691fZnp6TLOjZGEFTcWhtBjGtbr0wFmFkn8H
9M3swwe7iDzX/Ff5d5qE+npg/JJTuc643k7OAzpQdzAY/w0lcDruSnLK0TOVq9CX
o68q4eW0N22XViOXC6lU6V4Yl8GiymmaTxf4giECMImpLJjnYefGybMW/r/hUHoW
B94GvlJ/D0cHGnjddAUwT1caEsxpItj5SoSOxyQLicnz/mOZGYXG9VZG8nVJZ1PX
zs0VCKZiqYTG8cpxcQqviiwWgnEye+JpMoNhj2BGbYpYZULHbHl7UCh2b7165IUe
XOLEW5Df0KR1Z2Y/qrhf7YUNKWwHMw==
=6DlY
-----END PGP SIGNATURE-----

--20U8vtaF2eFkW8c0knqlgdEtNAncnIg9P--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?f264ebcc-4cd4-4541-f19d-227cde74b3ba>