head 1.1; access; symbols pkgsrc-2026Q1:1.1.0.88 pkgsrc-2026Q1-base:1.1 pkgsrc-2025Q4:1.1.0.86 pkgsrc-2025Q4-base:1.1 pkgsrc-2025Q3:1.1.0.84 pkgsrc-2025Q3-base:1.1 pkgsrc-2025Q2:1.1.0.82 pkgsrc-2025Q2-base:1.1 pkgsrc-2025Q1:1.1.0.80 pkgsrc-2025Q1-base:1.1 pkgsrc-2024Q4:1.1.0.78 pkgsrc-2024Q4-base:1.1 pkgsrc-2024Q3:1.1.0.76 pkgsrc-2024Q3-base:1.1 pkgsrc-2024Q2:1.1.0.74 pkgsrc-2024Q2-base:1.1 pkgsrc-2024Q1:1.1.0.72 pkgsrc-2024Q1-base:1.1 pkgsrc-2023Q4:1.1.0.70 pkgsrc-2023Q4-base:1.1 pkgsrc-2023Q3:1.1.0.68 pkgsrc-2023Q3-base:1.1 pkgsrc-2023Q2:1.1.0.66 pkgsrc-2023Q2-base:1.1 pkgsrc-2023Q1:1.1.0.64 pkgsrc-2023Q1-base:1.1 pkgsrc-2022Q4:1.1.0.62 pkgsrc-2022Q4-base:1.1 pkgsrc-2022Q3:1.1.0.60 pkgsrc-2022Q3-base:1.1 pkgsrc-2022Q2:1.1.0.58 pkgsrc-2022Q2-base:1.1 pkgsrc-2022Q1:1.1.0.56 pkgsrc-2022Q1-base:1.1 pkgsrc-2021Q4:1.1.0.54 pkgsrc-2021Q4-base:1.1 pkgsrc-2021Q3:1.1.0.52 pkgsrc-2021Q3-base:1.1 pkgsrc-2021Q2:1.1.0.50 pkgsrc-2021Q2-base:1.1 pkgsrc-2021Q1:1.1.0.48 pkgsrc-2021Q1-base:1.1 pkgsrc-2020Q4:1.1.0.46 pkgsrc-2020Q4-base:1.1 pkgsrc-2020Q3:1.1.0.44 pkgsrc-2020Q3-base:1.1 pkgsrc-2020Q2:1.1.0.40 pkgsrc-2020Q2-base:1.1 pkgsrc-2020Q1:1.1.0.20 pkgsrc-2020Q1-base:1.1 pkgsrc-2019Q4:1.1.0.42 pkgsrc-2019Q4-base:1.1 pkgsrc-2019Q3:1.1.0.38 pkgsrc-2019Q3-base:1.1 pkgsrc-2019Q2:1.1.0.36 pkgsrc-2019Q2-base:1.1 pkgsrc-2019Q1:1.1.0.34 pkgsrc-2019Q1-base:1.1 pkgsrc-2018Q4:1.1.0.32 pkgsrc-2018Q4-base:1.1 pkgsrc-2018Q3:1.1.0.30 pkgsrc-2018Q3-base:1.1 pkgsrc-2018Q2:1.1.0.28 pkgsrc-2018Q2-base:1.1 pkgsrc-2018Q1:1.1.0.26 pkgsrc-2018Q1-base:1.1 pkgsrc-2017Q4:1.1.0.24 pkgsrc-2017Q4-base:1.1 pkgsrc-2017Q3:1.1.0.22 pkgsrc-2017Q3-base:1.1 pkgsrc-2017Q2:1.1.0.18 pkgsrc-2017Q2-base:1.1 pkgsrc-2017Q1:1.1.0.16 pkgsrc-2017Q1-base:1.1 pkgsrc-2016Q4:1.1.0.14 pkgsrc-2016Q4-base:1.1 pkgsrc-2016Q3:1.1.0.12 pkgsrc-2016Q3-base:1.1 pkgsrc-2016Q2:1.1.0.10 pkgsrc-2016Q2-base:1.1 pkgsrc-2016Q1:1.1.0.8 pkgsrc-2016Q1-base:1.1 pkgsrc-2015Q4:1.1.0.6 pkgsrc-2015Q4-base:1.1 pkgsrc-2015Q3:1.1.0.4 pkgsrc-2015Q3-base:1.1 pkgsrc-2015Q2:1.1.0.2 pkgsrc-2015Q2-base:1.1; locks; strict; comment @# @; 1.1 date 2015.04.25.10.32.07; author wiz; state Exp; branches; next ; commitid ES9v208wstfmwXiy; desc @@ 1.1 log @Re-Import gcc2-2.95.3nb7 as lang/gcc2 (previously lang/gcc). This directory contains the GNU Compiler Collection (GCC) version 2.95. It includes all of the support for compiling C, C++, Objective C, Fortran, Java, and Chill. The GNU Compiler Collection is free software. See the file COPYING for copying permission. See the file gcc.texi (together with other files that it includes) for installation and porting information. The file INSTALL contains a copy of the installation information, as plain ASCII. See the Bugs chapter of the GCC Manual for how to report bugs usefully. An online readable version of the manual is in the files gcc.info*. @ text @$NetBSD: patch-af,v 1.9 2003/07/12 08:53:40 jtb Exp $ --- ../gcc-2.95.3/gcc/config/netbsd.h +++ ../gcc-2.95.3/gcc/config/netbsd.h.orig @@@@ -36,10 +36,13 @@@@ /* Provide a CPP_SPEC appropriate for NetBSD. Current we just deal with - the GCC option `-posix'. */ + the GCC option `-posix'. We also deal with -pthread, which is required + for the 2.95.3 STL to work. */ #undef CPP_SPEC -#define CPP_SPEC "%(cpp_cpu) %{posix:-D_POSIX_SOURCE}" +#define CPP_SPEC \ + "%(cpp_cpu) %{posix:-D_POSIX_SOURCE} \ + %{pthread:-D_REENTRANT -D_PTHREADS}" /* Provide an ASM_SPEC appropriate for NetBSD. Currently we only deal with the options for generating PIC code. */ @@@@ -54,7 +57,8 @@@@ #undef LIB_SPEC #define LIB_SPEC \ - "%{posix:%{!p:%{!pg:-lposix}}%{p:-lposix_p}%{pg:-lposix_p}} \ + "%{pthread:%{!p:%{!pg:-lpthread}}%{p:-lpthread_p}%{pg:-lpthread_p}} \ + %{posix:%{!p:%{!pg:-lposix}}%{p:-lposix_p}%{pg:-lposix_p}} \ %{!shared:%{!symbolic:%{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}}}" /* Provide a LIBGCC_SPEC appropriate for NetBSD. We also want to exclude @@@@ -64,7 +68,7 @@@@ #ifdef NETBSD_NATIVE #define LIBGCC_SPEC "%{!symbolic:%{!shared:%{!p:%{!pg:-lgcc}}}%{shared:-lgcc_pic}%{p:-lgcc_p}%{pg:-lgcc_p}}" #else -#define LIBGCC_SPEC "%{!shared:%{!symbolic:-lgcc}}" +#define LIBGCC_SPEC "%{!symbolic:%{!shared:-lgcc}%{shared:-lgcc_pic}}" #endif /* #ifdef NETBSD_AOUT */ @@@@ -147,6 +151,96 @@@@ #define ASM_DECLARE_RESULT(FILE, RESULT) #endif +/* NetBSD a.out support begins here. */ + +#ifndef NETBSD_ELF + +#undef DWARF_DEBUGGING_INFO /* XXX */ +#undef DWARF2_DEBUGGING_INFO /* XXX */ + +/* Write the extra assembler code needed to declare a function properly. + Some svr4 assemblers need to also have something extra said about the + function's return value. We allow for that here. */ + +#undef ASM_DECLARE_FUNCTION_NAME +#define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \ + do { \ + fprintf (FILE, "\t%s\t ", TYPE_ASM_OP); \ + assemble_name (FILE, NAME); \ + putc (',', FILE); \ + fprintf (FILE, TYPE_OPERAND_FMT, "function"); \ + putc ('\n', FILE); \ + ASM_DECLARE_RESULT (FILE, DECL_RESULT (DECL)); \ + ASM_OUTPUT_LABEL(FILE, NAME); \ + } while (0) + +/* Write the extra assembler code needed to declare an object properly. */ + +#undef ASM_DECLARE_OBJECT_NAME +#define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL) \ + do { \ + fprintf (FILE, "\t%s\t ", TYPE_ASM_OP); \ + assemble_name (FILE, NAME); \ + putc (',', FILE); \ + fprintf (FILE, TYPE_OPERAND_FMT, "object"); \ + putc ('\n', FILE); \ + size_directive_output = 0; \ + if (!flag_inhibit_size_directive && DECL_SIZE (DECL)) \ + { \ + size_directive_output = 1; \ + fprintf (FILE, "\t%s\t ", SIZE_ASM_OP); \ + assemble_name (FILE, NAME); \ + fprintf (FILE, ",%d\n", int_size_in_bytes (TREE_TYPE (DECL))); \ + } \ + ASM_OUTPUT_LABEL(FILE, NAME); \ + } while (0) + +/* Output the size directive for a decl in rest_of_decl_compilation + in the case where we did not do so before the initializer. + Once we find the error_mark_node, we know that the value of + size_directive_output was set + by ASM_DECLARE_OBJECT_NAME when it was run for the same decl. */ + +#undef ASM_FINISH_DECLARE_OBJECT +#define ASM_FINISH_DECLARE_OBJECT(FILE, DECL, TOP_LEVEL, AT_END) \ +do { \ + char *name = XSTR (XEXP (DECL_RTL (DECL), 0), 0); \ + if (!flag_inhibit_size_directive && DECL_SIZE (DECL) \ + && ! AT_END && TOP_LEVEL \ + && DECL_INITIAL (DECL) == error_mark_node \ + && !size_directive_output) \ + { \ + size_directive_output = 1; \ + fprintf (FILE, "\t%s\t ", SIZE_ASM_OP); \ + assemble_name (FILE, name); \ + fprintf (FILE, ",%d\n", int_size_in_bytes (TREE_TYPE (DECL))); \ + } \ + } while (0) + +/* This is how to declare the size of a function. */ + +#undef ASM_DECLARE_FUNCTION_SIZE +#define ASM_DECLARE_FUNCTION_SIZE(FILE, FNAME, DECL) \ + do { \ + if (!flag_inhibit_size_directive) \ + { \ + char label[256]; \ + static int labelno; \ + labelno++; \ + ASM_GENERATE_INTERNAL_LABEL (label, "Lfe", labelno); \ + ASM_OUTPUT_INTERNAL_LABEL (FILE, "Lfe", labelno); \ + fprintf (FILE, "\t%s\t ", SIZE_ASM_OP); \ + assemble_name (FILE, (FNAME)); \ + fprintf (FILE, ","); \ + assemble_name (FILE, label); \ + fprintf (FILE, "-"); \ + assemble_name (FILE, (FNAME)); \ + putc ('\n', FILE); \ + } \ + } while (0) + +#endif + /* NetBSD ELF support begins here. */ #ifdef NETBSD_ELF @@@@ -167,6 +261,7 @@@@ %{!pg: \ %{p:gcrt0%O%s} \ %{!p:crt0%O%s}}} \ + %:if-exists(crti%O%s) \ %{!shared:crtbegin%O%s} %{shared:crtbeginS%O%s}" /* Provide an ENDFILE_SPEC appropriate for NetBSD ELF targets. Here we @@@@ -175,13 +270,14 @@@@ #undef ENDFILE_SPEC #define ENDFILE_SPEC \ - "%{!shared:crtend%O%s} %{shared:crtendS%O%s}" + "%{!shared:crtend%O%s} %{shared:crtendS%O%s} \ + %:if-exists(crtn%O%s)" /* Provide a LINK_SPEC appropriate for a NetBSD ELF target. */ #undef LINK_SPEC #define LINK_SPEC \ - "%{assert*} \ + "%{assert*} %{R*} \ %{shared:-shared} \ %{!shared: \ -dc -dp \ @