public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug bootstrap/107568] New: Bootstrap failure on macOS 12.6 (monterey)
@ 2022-11-08 11:47 simon at pushface dot org
  2022-11-08 13:34 ` [Bug bootstrap/107568] " rguenth at gcc dot gnu.org
                   ` (19 more replies)
  0 siblings, 20 replies; 21+ messages in thread
From: simon at pushface dot org @ 2022-11-08 11:47 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107568

            Bug ID: 107568
           Summary: Bootstrap failure on macOS 12.6 (monterey)
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: bootstrap
          Assignee: unassigned at gcc dot gnu.org
          Reporter: simon at pushface dot org
  Target Milestone: ---

GCC 13-20221030.
With Command Line Tools 14.1.0.0.1.1663981106, the following failures seen in
stage 2.
Bootstrap compiler: 12.2.0.

/Volumes/Miscellaneous1/src/gcc-13-20221030/libcpp/lex.cc: In function
'unsigned char* cpp_output_line_to_string(cpp_reader*, const unsigned char*)':
/Volumes/Miscellaneous1/src/gcc-13-20221030/libcpp/lex.cc:4624:15: error: 'int
sprintf(char*, const char*, ...)' is deprecated: This function is provided for
compatibility reasons only.  Due to security concerns inherent in the design of
sprintf(3), it is highly recommended that you use snprintf(3) instead.
[-Werror=deprecated-declarations]
 4624 |       sprintf ((char *) result, "#%s ", dir_name);
      |       ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from
/Volumes/Miscellaneous1/src/gcc-13-20221030/libcpp/system.h:38,
                 from
/Volumes/Miscellaneous1/src/gcc-13-20221030/libcpp/lex.cc:23:
/Volumes/Miscellaneous1/x86_64/gcc-13-20221030/prev-gcc/include-fixed/stdio.h:204:10:
note: declared here
  204 | int      sprintf(char * __restrict, const char * __restrict, ...)
__printflike(2, 3);
      |          ^~~~~~~

...

/Volumes/Miscellaneous1/src/gcc-13-20221030/libcpp/charset.cc: In function
'const uchar* convert_escape(cpp_reader*, const uchar*, const uchar*,
_cpp_strbuf*, cset_converter, cpp_string_location_reader*,
cpp_substring_ranges*)':
/Volumes/Miscellaneous1/src/gcc-13-20221030/libcpp/charset.cc:2207:18: error:
'int sprintf(char*, const char*, ...)' is deprecated: This function is provided
for compatibility reasons only.  Due to security concerns inherent in the
design of sprintf(3), it is highly recommended that you use snprintf(3)
instead. [-Werror=deprecated-declarations]
 2207 |           sprintf(buf, "%03o", (int) c);
      |           ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
In file included from
/Volumes/Miscellaneous1/src/gcc-13-20221030/libcpp/system.h:38,
                 from
/Volumes/Miscellaneous1/src/gcc-13-20221030/libcpp/charset.cc:21:
/Volumes/Miscellaneous1/x86_64/gcc-13-20221030/prev-gcc/include-fixed/stdio.h:204:10:
note: declared here
  204 | int      sprintf(char * __restrict, const char * __restrict, ...)
__printflike(2, 3);
      |          ^~~~~~~

...

/Volumes/Miscellaneous1/src/gcc-13-20221030/libcpp/macro.cc: In function 'const
uchar* _cpp_builtin_macro_text(cpp_reader*, cpp_hashnode*, location_t)':
/Volumes/Miscellaneous1/src/gcc-13-20221030/libcpp/macro.cc:639:23: error: 'int
sprintf(char*, const char*, ...)' is deprecated: This function is provided for
compatibility reasons only.  Due to security concerns inherent in the design of
sprintf(3), it is highly recommended that you use snprintf(3) instead.
[-Werror=deprecated-declarations]
  639 |               sprintf ((char *) pfile->date, "\"%s %2d %4d\"",
      |               ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  640 |                        monthnames[tb->tm_mon], tb->tm_mday,
      |                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  641 |                        tb->tm_year + 1900);
      |                        ~~~~~~~~~~~~~~~~~~~
In file included from
/Volumes/Miscellaneous1/src/gcc-13-20221030/libcpp/system.h:38,
                 from
/Volumes/Miscellaneous1/src/gcc-13-20221030/libcpp/macro.cc:26:
/Volumes/Miscellaneous1/x86_64/gcc-13-20221030/prev-gcc/include-fixed/stdio.h:204:10:
note: declared here
  204 | int      sprintf(char * __restrict, const char * __restrict, ...)
__printflike(2, 3);
      |          ^~~~~~~
/Volumes/Miscellaneous1/src/gcc-13-20221030/libcpp/macro.cc:645:23: error: 'int
sprintf(char*, const char*, ...)' is deprecated: This function is provided for
compatibility reasons only.  Due to security concerns inherent in the design of
sprintf(3), it is highly recommended that you use snprintf(3) instead.
[-Werror=deprecated-declarations]
  645 |               sprintf ((char *) pfile->time, "\"%02d:%02d:%02d\"",
      |               ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  646 |                        tb->tm_hour, tb->tm_min, tb->tm_sec);
      |                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Volumes/Miscellaneous1/x86_64/gcc-13-20221030/prev-gcc/include-fixed/stdio.h:204:10:
note: declared here
  204 | int      sprintf(char * __restrict, const char * __restrict, ...)
__printflike(2, 3);
      |          ^~~~~~~
/Volumes/Miscellaneous1/src/gcc-13-20221030/libcpp/macro.cc:686:15: error: 'int
sprintf(char*, const char*, ...)' is deprecated: This function is provided for
compatibility reasons only.  Due to security concerns inherent in the design of
sprintf(3), it is highly recommended that you use snprintf(3) instead.
[-Werror=deprecated-declarations]
  686 |       sprintf ((char *) result, "%u", number);
      |       ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Volumes/Miscellaneous1/x86_64/gcc-13-20221030/prev-gcc/include-fixed/stdio.h:204:10:
note: declared here
  204 | int      sprintf(char * __restrict, const char * __restrict, ...)
__printflike(2, 3);
      |          ^~~~~~~

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug bootstrap/107568] Bootstrap failure on macOS 12.6 (monterey)
  2022-11-08 11:47 [Bug bootstrap/107568] New: Bootstrap failure on macOS 12.6 (monterey) simon at pushface dot org
@ 2022-11-08 13:34 ` rguenth at gcc dot gnu.org
  2022-11-08 13:37 ` jakub at gcc dot gnu.org
                   ` (18 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-11-08 13:34 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107568

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |build

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
So darwin marks sprintf as deprecated?

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug bootstrap/107568] Bootstrap failure on macOS 12.6 (monterey)
  2022-11-08 11:47 [Bug bootstrap/107568] New: Bootstrap failure on macOS 12.6 (monterey) simon at pushface dot org
  2022-11-08 13:34 ` [Bug bootstrap/107568] " rguenth at gcc dot gnu.org
@ 2022-11-08 13:37 ` jakub at gcc dot gnu.org
  2022-11-08 15:59 ` [Bug target/107568] " pinskia at gcc dot gnu.org
                   ` (17 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-11-08 13:37 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107568

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Ugh.  Using sprintf when one can prove it will never overflow should be just
fine.  Dunno how can they deprecate it when it isn't deprecated even in C2X.

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug target/107568] Bootstrap failure on macOS 12.6 (monterey)
  2022-11-08 11:47 [Bug bootstrap/107568] New: Bootstrap failure on macOS 12.6 (monterey) simon at pushface dot org
  2022-11-08 13:34 ` [Bug bootstrap/107568] " rguenth at gcc dot gnu.org
  2022-11-08 13:37 ` jakub at gcc dot gnu.org
@ 2022-11-08 15:59 ` pinskia at gcc dot gnu.org
  2022-11-09  8:47 ` sam at gentoo dot org
                   ` (16 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-11-08 15:59 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107568

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|bootstrap                   |target

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
The first one is definitely ok:
          /* diagnostic.cc does not support "%03o".  When it does, this
             code can use %03o directly in the diagnostic again.  */
          char buf[32];

32 characters will always fit 8bit octal result.

The second one will always fit too:
static const char * const monthnames[] =
{
  "Jan", "Feb", "Mar", "Apr", "May", "Jun",
  "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
};
....
              pfile->date = _cpp_unaligned_alloc (pfile,
                                                  sizeof ("\"Oct 11 1347\""));
              sprintf ((char *) pfile->date, "\"%s %2d %4d\"",
                       monthnames[tb->tm_mon], tb->tm_mday,
                       tb->tm_year + 1900);

Likewise for the next one:
              pfile->time = _cpp_unaligned_alloc (pfile,
                                                  sizeof ("\"12:34:56\""));
              sprintf ((char *) pfile->time, "\"%02d:%02d:%02d\"",
                       tb->tm_hour, tb->tm_min, tb->tm_sec);


This is definitely a bug in Apple's headers.  I guess we need to fixincludes
them to undeprecated them for GCC.

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug target/107568] Bootstrap failure on macOS 12.6 (monterey)
  2022-11-08 11:47 [Bug bootstrap/107568] New: Bootstrap failure on macOS 12.6 (monterey) simon at pushface dot org
                   ` (2 preceding siblings ...)
  2022-11-08 15:59 ` [Bug target/107568] " pinskia at gcc dot gnu.org
@ 2022-11-09  8:47 ` sam at gentoo dot org
  2022-11-20 19:13 ` iains at gcc dot gnu.org
                   ` (15 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: sam at gentoo dot org @ 2022-11-09  8:47 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107568

Sam James <sam at gentoo dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |iains at gcc dot gnu.org

--- Comment #4 from Sam James <sam at gentoo dot org> ---
See also Iain's bug at https://github.com/iains/gcc-darwin-arm64/issues/98.

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug target/107568] Bootstrap failure on macOS 12.6 (monterey)
  2022-11-08 11:47 [Bug bootstrap/107568] New: Bootstrap failure on macOS 12.6 (monterey) simon at pushface dot org
                   ` (3 preceding siblings ...)
  2022-11-09  8:47 ` sam at gentoo dot org
@ 2022-11-20 19:13 ` iains at gcc dot gnu.org
  2022-12-13 10:24 ` iains at gcc dot gnu.org
                   ` (14 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: iains at gcc dot gnu.org @ 2022-11-20 19:13 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107568

Iain Sandoe <iains at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2022-11-20
             Status|UNCONFIRMED                 |NEW

--- Comment #5 from Iain Sandoe <iains at gcc dot gnu.org> ---
sorry this bug is in two places; when I first encountered the issue it was with
my prototype aarch64 development branch, so not appropriate to BZ ...
.. however seems it does also affect unpatched master.

summary: 
 - the headers are (at least IMO) buggy since the functions are not deprecated
in any of the standards I have access too.
 - it might be very nice to make GCC more robust by using the 'n' versions, but
that's quite a big project and not going to be appropriate to GCC-13.
 - We can fixincludes the deprecations, as Andrew and Jakub have commented (but
I'll wait for the XC14.1 release)

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug target/107568] Bootstrap failure on macOS 12.6 (monterey)
  2022-11-08 11:47 [Bug bootstrap/107568] New: Bootstrap failure on macOS 12.6 (monterey) simon at pushface dot org
                   ` (4 preceding siblings ...)
  2022-11-20 19:13 ` iains at gcc dot gnu.org
@ 2022-12-13 10:24 ` iains at gcc dot gnu.org
  2022-12-13 11:20 ` [Bug target/107568] Darwin: Bootstrap fails with macOS13 sdk because sprintf and friends are deprecated in the SDK pinskia at gcc dot gnu.org
                   ` (13 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: iains at gcc dot gnu.org @ 2022-12-13 10:24 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107568

--- Comment #6 from Iain Sandoe <iains at gcc dot gnu.org> ---
since this effects upstream *-*-darwin21+ the bug is now tracked here (I've
closed the arm64 duvet branch dup)

I am considering amending the darwin host module to add
-Wno-error=deprecated-declarations to the STAGE2+ flags, rather than
fix-including.

Two reasons:
 * fixincludes make life tricky when compiling for different Darwin versions
with --sysroot (since they leak into the target runtime, esp. libstdc++
headers).  It's better to avoid them if possible

 * fixinclude-ing would make the GCC behaviour different from clang's on
end-user's code. It is clear that Apple's intention is dissuade users from the
unsafer APIs (which is reasonable, I guess, but the mechanism is a bit
heavy-handed).

anyway just thoughts at present, no draft patch yet.

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug target/107568] Darwin: Bootstrap fails with macOS13 sdk because sprintf and friends are deprecated in the SDK.
  2022-11-08 11:47 [Bug bootstrap/107568] New: Bootstrap failure on macOS 12.6 (monterey) simon at pushface dot org
                   ` (5 preceding siblings ...)
  2022-12-13 10:24 ` iains at gcc dot gnu.org
@ 2022-12-13 11:20 ` pinskia at gcc dot gnu.org
  2023-01-02 12:34 ` juergen.reuter at desy dot de
                   ` (12 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-12-13 11:20 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107568

--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Except sprintf is 100% when used correctly. And snprintf requires just as much
audit as sprintf does really. Many people have written about this before where
using snprint just gives a false sense of security even.

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug target/107568] Darwin: Bootstrap fails with macOS13 sdk because sprintf and friends are deprecated in the SDK.
  2022-11-08 11:47 [Bug bootstrap/107568] New: Bootstrap failure on macOS 12.6 (monterey) simon at pushface dot org
                   ` (6 preceding siblings ...)
  2022-12-13 11:20 ` [Bug target/107568] Darwin: Bootstrap fails with macOS13 sdk because sprintf and friends are deprecated in the SDK pinskia at gcc dot gnu.org
@ 2023-01-02 12:34 ` juergen.reuter at desy dot de
  2023-01-02 12:44 ` iains at gcc dot gnu.org
                   ` (11 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: juergen.reuter at desy dot de @ 2023-01-02 12:34 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107568

--- Comment #8 from Jürgen Reuter <juergen.reuter at desy dot de> ---
What is the status of this problem? I checked with Darwin 22.2 and XCode 14.2,
and the problem still persists with the Git master, cf. below. Is there a
workaround for the moment? Will this be resolved before the release of gcc14?


/usr/local/packages/gcc_trunk/_build/./prev-gcc/xg++
-B/usr/local/packages/gcc_trunk/_build/./prev-gcc/
-B/usr/local/x86_64-apple-darwin22.2.0/bin/ -nostdinc++
-B/usr/local/packages/gcc_trunk/_build/prev-x86_64-apple-darwin22.2.0/libstdc++-v3/src/.libs
-B/usr/local/packages/gcc_trunk/_build/prev-x86_64-apple-darwin22.2.0/libstdc++-v3/libsupc++/.libs

-I/usr/local/packages/gcc_trunk/_build/prev-x86_64-apple-darwin22.2.0/libstdc++-v3/include/x86_64-apple-darwin22.2.0

-I/usr/local/packages/gcc_trunk/_build/prev-x86_64-apple-darwin22.2.0/libstdc++-v3/include
 -I/usr/local/packages/gcc_trunk/libstdc++-v3/libsupc++
-L/usr/local/packages/gcc_trunk/_build/prev-x86_64-apple-darwin22.2.0/libstdc++-v3/src/.libs
-L/usr/local/packages/gcc_trunk/_build/prev-x86_64-apple-darwin22.2.0/libstdc++-v3/libsupc++/.libs
 -I../../libcpp -I. -I../../libcpp/../include -I./../intl
-I../../libcpp/include  -g -O2 -fno-checking -gtoggle -W -Wall -Wno-narrowing
-Wwrite-strings -Wmissing-format-attribute -pedantic -Wno-long-long -Werror
-fno-exceptions -fno-rtti -I../../libcpp -I. -I../../libcpp/../include
-I./../intl -I../../libcpp/include    -c -o charset.o -MT charset.o -MMD -MP
-MF .deps/charset.Tpo ../../libcpp/charset.cc
../../libcpp/charset.cc: In function ‘const uchar* convert_escape(cpp_reader*,
const uchar*, const uchar*, _cpp_strbuf*, cset_converter,
cpp_string_location_reader*, cpp_substring_ranges*)’:
../../libcpp/charset.cc:2207:18: error: ‘int sprintf(char*, const char*, ...)’
is deprecated: This function is provided for compatibility reasons only.  Due
to security concerns inherent in the design of sprintf(3), it is highly
recommended that you use snprintf(3) instead. [-Werror=deprecated-declarations]
 2207 |           sprintf(buf, "%03o", (int) c);
      |           ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
In file included from ../../libcpp/system.h:38,
                 from ../../libcpp/charset.cc:21:
/usr/local/packages/gcc_trunk/_build/prev-gcc/include-fixed/stdio.h:204:10:
note: declared here
  204 | int      sprintf(char * __restrict, const char * __restrict, ...)
__printflike(2, 3);
      |          ^~~~~~~

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug target/107568] Darwin: Bootstrap fails with macOS13 sdk because sprintf and friends are deprecated in the SDK.
  2022-11-08 11:47 [Bug bootstrap/107568] New: Bootstrap failure on macOS 12.6 (monterey) simon at pushface dot org
                   ` (7 preceding siblings ...)
  2023-01-02 12:34 ` juergen.reuter at desy dot de
@ 2023-01-02 12:44 ` iains at gcc dot gnu.org
  2023-01-02 14:00 ` juergen.reuter at desy dot de
                   ` (10 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: iains at gcc dot gnu.org @ 2023-01-02 12:44 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107568

Iain Sandoe <iains at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |13.0

--- Comment #9 from Iain Sandoe <iains at gcc dot gnu.org> ---
(I don't have a macOS13 setup yet, limited hardware available here)

... so, if it is not fixed in the Xcode 14.x releases, we'll have to work
around it in the GCC sources.

Work-around is to add this to the 'make' command line.

BOOT_CFLAGS="-O2 -g -Wno-error=deprecated-declarations" 

I think we can arrange for that to be added automatically to the build flags,
it is intended to deal with this before 13 branches.

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug target/107568] Darwin: Bootstrap fails with macOS13 sdk because sprintf and friends are deprecated in the SDK.
  2022-11-08 11:47 [Bug bootstrap/107568] New: Bootstrap failure on macOS 12.6 (monterey) simon at pushface dot org
                   ` (8 preceding siblings ...)
  2023-01-02 12:44 ` iains at gcc dot gnu.org
@ 2023-01-02 14:00 ` juergen.reuter at desy dot de
  2023-01-02 14:09 ` iains at gcc dot gnu.org
                   ` (9 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: juergen.reuter at desy dot de @ 2023-01-02 14:00 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107568

--- Comment #10 from Jürgen Reuter <juergen.reuter at desy dot de> ---
(In reply to Iain Sandoe from comment #9)
> (I don't have a macOS13 setup yet, limited hardware available here)
> 
> ... so, if it is not fixed in the Xcode 14.x releases, we'll have to work
> around it in the GCC sources.
> 
> Work-around is to add this to the 'make' command line.
> 
> BOOT_CFLAGS="-O2 -g -Wno-error=deprecated-declarations" 
> 
> I think we can arrange for that to be added automatically to the build
> flags, it is intended to deal with this before 13 branches.

Hm, this doesn't work for me, neither when adding to the configure line nor
when adding it to the make command. Sorry for being ignorant, but how do I have
to apply this?

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug target/107568] Darwin: Bootstrap fails with macOS13 sdk because sprintf and friends are deprecated in the SDK.
  2022-11-08 11:47 [Bug bootstrap/107568] New: Bootstrap failure on macOS 12.6 (monterey) simon at pushface dot org
                   ` (9 preceding siblings ...)
  2023-01-02 14:00 ` juergen.reuter at desy dot de
@ 2023-01-02 14:09 ` iains at gcc dot gnu.org
  2023-01-02 17:12 ` iains at gcc dot gnu.org
                   ` (8 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: iains at gcc dot gnu.org @ 2023-01-02 14:09 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107568

--- Comment #11 from Iain Sandoe <iains at gcc dot gnu.org> ---
at what stage is it failing?
(and with what error)
.. when I las tried this with the macOS13 SDK it dod work .. I will try to fit
a test run in sometime (stuff is tied up with other testing right now)

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug target/107568] Darwin: Bootstrap fails with macOS13 sdk because sprintf and friends are deprecated in the SDK.
  2022-11-08 11:47 [Bug bootstrap/107568] New: Bootstrap failure on macOS 12.6 (monterey) simon at pushface dot org
                   ` (10 preceding siblings ...)
  2023-01-02 14:09 ` iains at gcc dot gnu.org
@ 2023-01-02 17:12 ` iains at gcc dot gnu.org
  2023-01-02 19:24 ` juergen.reuter at desy dot de
                   ` (7 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: iains at gcc dot gnu.org @ 2023-01-02 17:12 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107568

--- Comment #12 from Iain Sandoe <iains at gcc dot gnu.org> ---
with Xcode 14.1 CLT and the macOS13 SDK, the build fails without the
work-around and works for this:

time nice make -j10 BOOT_CFLAGS="-O2 -g -Wno-error=deprecated-declarations"
>b.txt 2>e.txt 


(jftr) configure line is:
/src-local/gcc-master/configure
--prefix=/opt/iains/x86_64-apple-darwin21/gcc-13-0-0
--build=x86_64-apple-darwin21
--with-sysroot=/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk
CC=x86_64-apple-darwin19-gcc CXX=x86_64-apple-darwin19-g++
--enable-languages=all >conf.txt

and the source is current master.

(OK, so the differences are [1] I am on macOS12 and [2] I'm using Xcode 14.1
CLT,but the fail and fix are completely repeatable here).

Next, I guess I'll pick up the xc 14.2 release.

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug target/107568] Darwin: Bootstrap fails with macOS13 sdk because sprintf and friends are deprecated in the SDK.
  2022-11-08 11:47 [Bug bootstrap/107568] New: Bootstrap failure on macOS 12.6 (monterey) simon at pushface dot org
                   ` (11 preceding siblings ...)
  2023-01-02 17:12 ` iains at gcc dot gnu.org
@ 2023-01-02 19:24 ` juergen.reuter at desy dot de
  2023-01-21 17:08 ` cvs-commit at gcc dot gnu.org
                   ` (6 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: juergen.reuter at desy dot de @ 2023-01-02 19:24 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107568

--- Comment #13 from Jürgen Reuter <juergen.reuter at desy dot de> ---
(In reply to Iain Sandoe from comment #12)
.
> 
> Next, I guess I'll pick up the xc 14.2 release.


Sorry, my bad, I misplaced the position of the argument 
BOOT_CFLAGS, I erroneously (like for configure, where it doesn't matter) in
front of the make command, not after the make command. In the second case, it
works.

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug target/107568] Darwin: Bootstrap fails with macOS13 sdk because sprintf and friends are deprecated in the SDK.
  2022-11-08 11:47 [Bug bootstrap/107568] New: Bootstrap failure on macOS 12.6 (monterey) simon at pushface dot org
                   ` (12 preceding siblings ...)
  2023-01-02 19:24 ` juergen.reuter at desy dot de
@ 2023-01-21 17:08 ` cvs-commit at gcc dot gnu.org
  2023-04-26  6:57 ` rguenth at gcc dot gnu.org
                   ` (5 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-01-21 17:08 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107568

--- Comment #14 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Iain D Sandoe <iains@gcc.gnu.org>:

https://gcc.gnu.org/g:442d2bdc1d2a98aba0b18aeaa3e87fa946ac8031

commit r13-5274-g442d2bdc1d2a98aba0b18aeaa3e87fa946ac8031
Author: Iain Sandoe <iain@sandoe.co.uk>
Date:   Wed Jan 18 19:58:33 2023 +0000

    Darwin, fixincludes: Handle MacOS13 SDK Apple-specific deprecations
[PR107568].

    The SDK for MacOS13 includes Apple-specific deprecations of some functions
that
    are not deprecated in Posix, C or C++ and widely used in GCC.

    The fix makes the deprecation conditional on __APPLE_LOCAL_DEPRECATIONS so
that
    end users may still observe them but they are hidden from normal
compilations.

    Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>

            PR target/107568

    fixincludes/ChangeLog:

            * fixincl.x: Regenerate.
            * inclhack.def: Add a fix for MacOS13 SDK function deprecations
            in stdio.h.
            * tests/base/stdio.h (__deprecated_msg): New test.

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug target/107568] Darwin: Bootstrap fails with macOS13 sdk because sprintf and friends are deprecated in the SDK.
  2022-11-08 11:47 [Bug bootstrap/107568] New: Bootstrap failure on macOS 12.6 (monterey) simon at pushface dot org
                   ` (13 preceding siblings ...)
  2023-01-21 17:08 ` cvs-commit at gcc dot gnu.org
@ 2023-04-26  6:57 ` rguenth at gcc dot gnu.org
  2023-05-16 19:05 ` cvs-commit at gcc dot gnu.org
                   ` (4 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-04-26  6:57 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107568

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|13.0                        |13.2

--- Comment #15 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 13.1 is being released, retargeting bugs to GCC 13.2.

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug target/107568] Darwin: Bootstrap fails with macOS13 sdk because sprintf and friends are deprecated in the SDK.
  2022-11-08 11:47 [Bug bootstrap/107568] New: Bootstrap failure on macOS 12.6 (monterey) simon at pushface dot org
                   ` (14 preceding siblings ...)
  2023-04-26  6:57 ` rguenth at gcc dot gnu.org
@ 2023-05-16 19:05 ` cvs-commit at gcc dot gnu.org
  2023-05-16 19:11 ` iains at gcc dot gnu.org
                   ` (3 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-05-16 19:05 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107568

--- Comment #16 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Iain D Sandoe
<iains@gcc.gnu.org>:

https://gcc.gnu.org/g:f4ad0b2287a334613f570c69b7c5320a5a7d7554

commit r11-10785-gf4ad0b2287a334613f570c69b7c5320a5a7d7554
Author: Iain Sandoe <iain@sandoe.co.uk>
Date:   Wed Jan 18 19:58:33 2023 +0000

    Darwin, fixincludes: Handle MacOS13 SDK Apple-specific deprecations
[PR107568].

    The SDK for MacOS13 includes Apple-specific deprecations of some functions
that
    are not deprecated in Posix, C or C++ and widely used in GCC.

    The fix makes the deprecation conditional on __APPLE_LOCAL_DEPRECATIONS so
that
    end users may still observe them but they are hidden from normal
compilations.

    Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>

            PR target/107568

    fixincludes/ChangeLog:

            * fixincl.x: Regenerate.
            * inclhack.def: Add a fix for MacOS13 SDK function deprecations
            in stdio.h.
            * tests/base/stdio.h (__deprecated_msg): New test.

    (cherry picked from commit 442d2bdc1d2a98aba0b18aeaa3e87fa946ac8031)

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug target/107568] Darwin: Bootstrap fails with macOS13 sdk because sprintf and friends are deprecated in the SDK.
  2022-11-08 11:47 [Bug bootstrap/107568] New: Bootstrap failure on macOS 12.6 (monterey) simon at pushface dot org
                   ` (15 preceding siblings ...)
  2023-05-16 19:05 ` cvs-commit at gcc dot gnu.org
@ 2023-05-16 19:11 ` iains at gcc dot gnu.org
  2023-05-21 18:55 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: iains at gcc dot gnu.org @ 2023-05-16 19:11 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107568

Iain Sandoe <iains at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|13.2                        |10.5

--- Comment #17 from Iain Sandoe <iains at gcc dot gnu.org> ---
needed on 10.x

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug target/107568] Darwin: Bootstrap fails with macOS13 sdk because sprintf and friends are deprecated in the SDK.
  2022-11-08 11:47 [Bug bootstrap/107568] New: Bootstrap failure on macOS 12.6 (monterey) simon at pushface dot org
                   ` (16 preceding siblings ...)
  2023-05-16 19:11 ` iains at gcc dot gnu.org
@ 2023-05-21 18:55 ` cvs-commit at gcc dot gnu.org
  2023-05-21 19:06 ` iains at gcc dot gnu.org
  2024-04-04 18:51 ` cvs-commit at gcc dot gnu.org
  19 siblings, 0 replies; 21+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-05-21 18:55 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107568

--- Comment #18 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Iain D Sandoe
<iains@gcc.gnu.org>:

https://gcc.gnu.org/g:34608a771216b40307bcbee767605a328265a940

commit r10-11414-g34608a771216b40307bcbee767605a328265a940
Author: Iain Sandoe <iain@sandoe.co.uk>
Date:   Wed Jan 18 19:58:33 2023 +0000

    Darwin, fixincludes: Handle MacOS13 SDK Apple-specific deprecations
[PR107568].

    The SDK for MacOS13 includes Apple-specific deprecations of some functions
that
    are not deprecated in Posix, C or C++ and widely used in GCC.

    The fix makes the deprecation conditional on __APPLE_LOCAL_DEPRECATIONS so
that
    end users may still observe them but they are hidden from normal
compilations.

    Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>

            PR target/107568

    fixincludes/ChangeLog:

            * fixincl.x: Regenerate.
            * inclhack.def: Add a fix for MacOS13 SDK function deprecations
            in stdio.h.
            * tests/base/stdio.h (__deprecated_msg): New test.

    (cherry picked from commit 442d2bdc1d2a98aba0b18aeaa3e87fa946ac8031)

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug target/107568] Darwin: Bootstrap fails with macOS13 sdk because sprintf and friends are deprecated in the SDK.
  2022-11-08 11:47 [Bug bootstrap/107568] New: Bootstrap failure on macOS 12.6 (monterey) simon at pushface dot org
                   ` (17 preceding siblings ...)
  2023-05-21 18:55 ` cvs-commit at gcc dot gnu.org
@ 2023-05-21 19:06 ` iains at gcc dot gnu.org
  2024-04-04 18:51 ` cvs-commit at gcc dot gnu.org
  19 siblings, 0 replies; 21+ messages in thread
From: iains at gcc dot gnu.org @ 2023-05-21 19:06 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107568

Iain Sandoe <iains at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #19 from Iain Sandoe <iains at gcc dot gnu.org> ---
fixed on open branches

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [Bug target/107568] Darwin: Bootstrap fails with macOS13 sdk because sprintf and friends are deprecated in the SDK.
  2022-11-08 11:47 [Bug bootstrap/107568] New: Bootstrap failure on macOS 12.6 (monterey) simon at pushface dot org
                   ` (18 preceding siblings ...)
  2023-05-21 19:06 ` iains at gcc dot gnu.org
@ 2024-04-04 18:51 ` cvs-commit at gcc dot gnu.org
  19 siblings, 0 replies; 21+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-04-04 18:51 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107568

--- Comment #20 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-12 branch has been updated by Iain D Sandoe
<iains@gcc.gnu.org>:

https://gcc.gnu.org/g:753d7e4edf63c4ff690858da11bf0d59aa24e1bb

commit r12-10311-g753d7e4edf63c4ff690858da11bf0d59aa24e1bb
Author: Iain Sandoe <iain@sandoe.co.uk>
Date:   Wed Jan 18 19:58:33 2023 +0000

    Darwin, fixincludes: Handle MacOS13 SDK Apple-specific deprecations
[PR107568].

    The SDK for MacOS13 includes Apple-specific deprecations of some functions
that
    are not deprecated in Posix, C or C++ and widely used in GCC.

    The fix makes the deprecation conditional on __APPLE_LOCAL_DEPRECATIONS so
that
    end users may still observe them but they are hidden from normal
compilations.

    Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>

            PR target/107568

    fixincludes/ChangeLog:

            * fixincl.x: Regenerate.
            * inclhack.def: Add a fix for MacOS13 SDK function deprecations
            in stdio.h.
            * tests/base/stdio.h (__deprecated_msg): New test.

    (cherry picked from commit 442d2bdc1d2a98aba0b18aeaa3e87fa946ac8031)

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2024-04-04 18:51 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-08 11:47 [Bug bootstrap/107568] New: Bootstrap failure on macOS 12.6 (monterey) simon at pushface dot org
2022-11-08 13:34 ` [Bug bootstrap/107568] " rguenth at gcc dot gnu.org
2022-11-08 13:37 ` jakub at gcc dot gnu.org
2022-11-08 15:59 ` [Bug target/107568] " pinskia at gcc dot gnu.org
2022-11-09  8:47 ` sam at gentoo dot org
2022-11-20 19:13 ` iains at gcc dot gnu.org
2022-12-13 10:24 ` iains at gcc dot gnu.org
2022-12-13 11:20 ` [Bug target/107568] Darwin: Bootstrap fails with macOS13 sdk because sprintf and friends are deprecated in the SDK pinskia at gcc dot gnu.org
2023-01-02 12:34 ` juergen.reuter at desy dot de
2023-01-02 12:44 ` iains at gcc dot gnu.org
2023-01-02 14:00 ` juergen.reuter at desy dot de
2023-01-02 14:09 ` iains at gcc dot gnu.org
2023-01-02 17:12 ` iains at gcc dot gnu.org
2023-01-02 19:24 ` juergen.reuter at desy dot de
2023-01-21 17:08 ` cvs-commit at gcc dot gnu.org
2023-04-26  6:57 ` rguenth at gcc dot gnu.org
2023-05-16 19:05 ` cvs-commit at gcc dot gnu.org
2023-05-16 19:11 ` iains at gcc dot gnu.org
2023-05-21 18:55 ` cvs-commit at gcc dot gnu.org
2023-05-21 19:06 ` iains at gcc dot gnu.org
2024-04-04 18:51 ` cvs-commit at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).