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 work!
>>>
>>> I was doing some testing using FreeBSD 11.0-STABLE and some of my
>>> configure scripts died.  However, they were working fine on FreeBSD 11.0
>>> RELEASE.
>>>
>>> I found the problem,  but I do not know how to resolve this.  When you
>>> install the GCC compiler from the PKG repository it appears to create a
>>> modified set of include files from the system (default?) include files
>>> (/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/064937.html
>>
>> Jung-uk Kim
>>
> Does this mean that the GCC port/package needs to be updated?  If so, 
> 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
Index: lang/gcc/files/patch-fixincludes_fixincl.x
===================================================================
--- 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 work
+  * correctly with ANSI C and placed in a directory that GNU C will search.
+  *
+- * 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[] = {
+ #endif /* !defined __STDC__ */",
+     (char*)NULL };
+ 
++/* * * * * * * * * * * * * * * * * * * * * * * * * *
++ *
++ *  Description of Freebsd_Sys_Types fix
++ */
++tSCC zFreebsd_Sys_TypesName[] =
++     "freebsd_sys_types";
+ 
++/*
++ *  File name selection pattern
++ */
++tSCC zFreebsd_Sys_TypesList[] =
++  "sys/types.h\0";
++/*
++ *  Machine/OS name selection pattern
++ */
++tSCC* apzFreebsd_Sys_TypesMachs[] = {
++        "*-*-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[] = { 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
+ 
+ /*
+  *  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;
+ 
+ tFixDesc fixDescList[ FIX_COUNT ] = {
+@@ -10880,5 +10910,10 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
+   {  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

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to