--- gcc3.4.spec.alt 2006-03-10 00:08:00 +0600 +++ gcc3.4.spec 2006-03-10 15:50:44 +0600 @@ -2,7 +2,7 @@ Name: gcc%gcc_branch Version: 3.4.5 -Release: alt2 +Release: alt2.0.1 Summary: GNU Compiler Collection License: GPL @@ -99,6 +99,9 @@ Patch702: gcc34-alt-nowrap.patch Patch703: gcc34-alt-as-needed.patch +# Local patches +Patch800: gcc-34-alt-visibility_headers.patch + Provides: gcc = %version-%release, %_bindir/%_target_platform-gcc, %_bindir/gcc Obsoletes: egcs, gcc3.0, gcc3.1 Conflicts: glibc-devel < 2.2.6 @@ -111,6 +114,7 @@ BuildPreReq: rpm-build >= 4.0.4-alt39, %alternatives_deps, %binutils_deps BuildPreReq: coreutils, flex, zlib-devel, glibc-devel-static +BuildPreReq: make >= 3.81beta3 %{?_with_objc:%{?_enable_objc_gc:BuildPreReq: libgc-devel}} %{?_with_java:BuildPreReq: imake libXt-devel libart_lgpl-devel libgtk+2-devel libltdl-devel xorg-cf-files} %{?_with_ada:BuildPreReq: gcc%gcc_branch-gnat} @@ -736,6 +740,8 @@ %patch702 -p1 %patch703 -p1 +%patch800 -p1 + find -type f -name \*.orig -delete -print # Set proper version & contact info. @@ -1488,6 +1494,9 @@ %endif #with_pdf %changelog +* Fri Mar 10 2006 Alexey Morozov 3.4.5-alt2.0.1 +- NMU: Added alt-visibility_headers patch for proper support of -fvisibility + * Thu Mar 09 2006 Dmitry V. Levin 3.4.5-alt2 - Relocated ffitarget.h (#9213). --- /dev/null 2006-03-29 20:21:20 +0700 +++ ../SOURCES/gcc-34-alt-visibility_headers.patch 2006-03-10 13:02:14 +0600 @@ -0,0 +1,231 @@ +diff -urN gcc-3.4.5-20051201.orig/gcc/gthr-dce.h gcc-3.4.5-20051201/gcc/gthr-dce.h +--- gcc-3.4.5-20051201.orig/gcc/gthr-dce.h 2005-11-21 19:43:20 +0600 ++++ gcc-3.4.5-20051201/gcc/gthr-dce.h 2006-03-10 12:55:48 +0600 +@@ -29,6 +29,8 @@ + #ifndef GCC_GTHR_DCE_H + #define GCC_GTHR_DCE_H + ++#pragma GCC visibility push(default) ++ + /* If _DCE_THREADS is not defined, then we're building the single + threaded version of the libraries and do not want to reference + anything related to pthreads or dce. */ +@@ -528,4 +530,7 @@ + #undef UNUSED + + #endif ++ ++#pragma GCC visibility pop ++ + #endif /* ! GCC_GTHR_DCE_H */ +diff -urN gcc-3.4.5-20051201.orig/gcc/gthr-gnat.h gcc-3.4.5-20051201/gcc/gthr-gnat.h +--- gcc-3.4.5-20051201.orig/gcc/gthr-gnat.h 2005-11-21 19:43:21 +0600 ++++ gcc-3.4.5-20051201/gcc/gthr-gnat.h 2006-03-10 12:48:16 +0600 +@@ -28,6 +28,8 @@ + #ifndef GCC_GTHR_GNAT_H + #define GCC_GTHR_GNAT_H + ++#pragma GCC visibility push(default) ++ + /* Just provide compatibility for mutex handling. */ + + typedef int __gthread_mutex_t; +@@ -39,5 +41,7 @@ + extern int __gthread_mutex_lock (__gthread_mutex_t *); + extern int __gthread_mutex_unlock (__gthread_mutex_t *); + ++#pragma GCC visibility pop ++ + #endif /* ! GCC_GTHR_GNAT_H */ + +diff -urN gcc-3.4.5-20051201.orig/gcc/gthr-posix.h gcc-3.4.5-20051201/gcc/gthr-posix.h +--- gcc-3.4.5-20051201.orig/gcc/gthr-posix.h 2006-03-10 12:32:12 +0600 ++++ gcc-3.4.5-20051201/gcc/gthr-posix.h 2006-03-10 12:50:11 +0600 +@@ -30,6 +30,8 @@ + #ifndef GCC_GTHR_POSIX_H + #define GCC_GTHR_POSIX_H + ++#pragma GCC visibility push(default) ++ + /* POSIX threads specific definitions. + Easy, since the interface is just one-to-one mapping. */ + +@@ -660,4 +662,6 @@ + + #endif /* _LIBOBJC */ + ++#pragma GCC visibility pop ++ + #endif /* ! GCC_GTHR_POSIX_H */ +diff -urN gcc-3.4.5-20051201.orig/gcc/gthr-rtems.h gcc-3.4.5-20051201/gcc/gthr-rtems.h +--- gcc-3.4.5-20051201.orig/gcc/gthr-rtems.h 2005-11-21 19:43:21 +0600 ++++ gcc-3.4.5-20051201/gcc/gthr-rtems.h 2006-03-10 12:50:40 +0600 +@@ -30,6 +30,8 @@ + #ifndef GCC_GTHR_RTEMS_H + #define GCC_GTHR_RTEMS_H + ++#pragma GCC visibility push(default) ++ + #ifdef __cplusplus + extern "C" { + #endif +@@ -125,4 +127,6 @@ + } + #endif + ++#pragma GCC visibility pop ++ + #endif /* ! GCC_GTHR_RTEMS_H */ +diff -urN gcc-3.4.5-20051201.orig/gcc/gthr-single.h gcc-3.4.5-20051201/gcc/gthr-single.h +--- gcc-3.4.5-20051201.orig/gcc/gthr-single.h 2005-11-21 19:43:21 +0600 ++++ gcc-3.4.5-20051201/gcc/gthr-single.h 2006-03-10 12:54:59 +0600 +@@ -29,6 +29,8 @@ + #ifndef GCC_GTHR_SINGLE_H + #define GCC_GTHR_SINGLE_H + ++#pragma GCC visibility push(default) ++ + /* Just provide compatibility for mutex handling. */ + + typedef int __gthread_mutex_t; +@@ -255,4 +257,6 @@ + + #undef UNUSED + ++#pragma GCC visibility pop ++ + #endif /* ! GCC_GTHR_SINGLE_H */ +diff -urN gcc-3.4.5-20051201.orig/gcc/gthr-solaris.h gcc-3.4.5-20051201/gcc/gthr-solaris.h +--- gcc-3.4.5-20051201.orig/gcc/gthr-solaris.h 2005-11-21 19:43:21 +0600 ++++ gcc-3.4.5-20051201/gcc/gthr-solaris.h 2006-03-10 12:56:10 +0600 +@@ -29,6 +29,8 @@ + #ifndef GCC_GTHR_SOLARIS_H + #define GCC_GTHR_SOLARIS_H + ++#pragma GCC visibility push(default) ++ + /* Solaris threads as found in Solaris 2.[456]. + Actually these are Unix International (UI) threads, but I don't + know if anyone else implements these. */ +@@ -488,4 +490,6 @@ + + #endif /* _LIBOBJC */ + ++#pragma GCC visibility pop ++ + #endif /* ! GCC_GTHR_SOLARIS_H */ +diff -urN gcc-3.4.5-20051201.orig/gcc/gthr-vxworks.h gcc-3.4.5-20051201/gcc/gthr-vxworks.h +--- gcc-3.4.5-20051201.orig/gcc/gthr-vxworks.h 2005-11-21 19:43:20 +0600 ++++ gcc-3.4.5-20051201/gcc/gthr-vxworks.h 2006-03-10 12:56:31 +0600 +@@ -30,6 +30,8 @@ + #ifndef GCC_GTHR_VXWORKS_H + #define GCC_GTHR_VXWORKS_H + ++#pragma GCC visibility push(default) ++ + #ifdef _LIBOBJC + + /* libobjc requires the optional pthreads component. */ +@@ -127,4 +129,6 @@ + + #endif /* not _LIBOBJC */ + ++#pragma GCC visibility pop ++ + #endif /* gthr-vxworks.h */ +diff -urN gcc-3.4.5-20051201.orig/gcc/gthr-win32.h gcc-3.4.5-20051201/gcc/gthr-win32.h +--- gcc-3.4.5-20051201.orig/gcc/gthr-win32.h 2005-11-21 19:43:20 +0600 ++++ gcc-3.4.5-20051201/gcc/gthr-win32.h 2006-03-10 12:56:54 +0600 +@@ -30,6 +30,8 @@ + #ifndef GCC_GTHR_WIN32_H + #define GCC_GTHR_WIN32_H + ++#pragma GCC visibility push(default) ++ + /* Windows32 threads specific definitions. The windows32 threading model + does not map well into pthread-inspired gcc's threading model, and so + there are caveats one needs to be aware of. +@@ -618,4 +620,6 @@ + + #endif /* _LIBOBJC */ + ++#pragma GCC visibility pop ++ + #endif /* ! GCC_GTHR_WIN32_H */ +diff -urN gcc-3.4.5-20051201.orig/libstdc++-v3/libsupc++/cxxabi.h gcc-3.4.5-20051201/libstdc++-v3/libsupc++/cxxabi.h +--- gcc-3.4.5-20051201.orig/libstdc++-v3/libsupc++/cxxabi.h 2005-11-21 19:43:32 +0600 ++++ gcc-3.4.5-20051201/libstdc++-v3/libsupc++/cxxabi.h 2006-03-10 12:35:56 +0600 +@@ -42,6 +42,8 @@ + #ifndef _CXXABI_H + #define _CXXABI_H 1 + ++#pragma GCC visibility push(default) ++ + #include + + #ifdef __cplusplus +@@ -525,4 +527,6 @@ + + #endif // __cplusplus + ++#pragma GCC visibility pop ++ + #endif // __CXXABI_H +diff -urN gcc-3.4.5-20051201.orig/libstdc++-v3/libsupc++/exception gcc-3.4.5-20051201/libstdc++-v3/libsupc++/exception +--- gcc-3.4.5-20051201.orig/libstdc++-v3/libsupc++/exception 2005-11-21 19:43:32 +0600 ++++ gcc-3.4.5-20051201/libstdc++-v3/libsupc++/exception 2006-03-10 12:37:12 +0600 +@@ -37,6 +37,8 @@ + #ifndef __EXCEPTION__ + #define __EXCEPTION__ + ++#pragma GCC visibility push(default) ++ + extern "C++" { + + namespace std +@@ -117,4 +119,6 @@ + + } // extern "C++" + ++#pragma GCC visibility pop ++ + #endif +diff -urN gcc-3.4.5-20051201.orig/libstdc++-v3/libsupc++/new gcc-3.4.5-20051201/libstdc++-v3/libsupc++/new +--- gcc-3.4.5-20051201.orig/libstdc++-v3/libsupc++/new 2005-11-21 19:43:32 +0600 ++++ gcc-3.4.5-20051201/libstdc++-v3/libsupc++/new 2006-03-10 12:59:46 +0600 +@@ -41,6 +41,8 @@ + #include + #include + ++#pragma GCC visibility push(default) ++ + extern "C++" { + + namespace std +@@ -98,4 +100,6 @@ + //@} + } // extern "C++" + ++#pragma GCC visibility pop ++ + #endif +diff -urN gcc-3.4.5-20051201.orig/libstdc++-v3/libsupc++/typeinfo gcc-3.4.5-20051201/libstdc++-v3/libsupc++/typeinfo +--- gcc-3.4.5-20051201.orig/libstdc++-v3/libsupc++/typeinfo 2005-11-21 19:43:32 +0600 ++++ gcc-3.4.5-20051201/libstdc++-v3/libsupc++/typeinfo 2006-03-10 12:58:54 +0600 +@@ -37,6 +37,8 @@ + + #include + ++#pragma GCC visibility push(default) ++ + extern "C++" { + + namespace __cxxabiv1 +@@ -153,4 +155,7 @@ + } // namespace std + + } // extern "C++" ++ ++#pragma GCC visibility pop ++ + #endif