Update to 4.8.1
[platform/upstream/gcc48.git] / packaging / gcc.spec.in
index a79796b..c152d02 100644 (file)
@@ -9,16 +9,11 @@
 %define build_ada 0
 %endif
 
-%define quadmath_arch %ix86 x86_64 ia64
+%define quadmath_arch %ix86 x86_64 
 
 # We don't want to build java
-%ifarch mips
-%define build_java 0
-%define build_libjava 0
-%else
 %define build_java 1
 %define build_libjava 0%{?building_libjava:1}%{?building_libffi:1}%{?building_testsuite:1}
-%endif
 
 %define build_cp 1
 %define build_fortran 1
@@ -62,8 +57,8 @@ BuildRequires: cloog-devel
 BuildRequires: ppl-devel
 %endif
 %if %{build_ada}
-%define hostsuffix -4.7
-BuildRequires: gcc47-ada
+%define hostsuffix -4.8
+BuildRequires: gcc48-ada
 %endif
 %if 0%{?building_libjava:1}%{?building_testsuite:1}
 BuildRequires: fastjar
@@ -72,9 +67,6 @@ BuildRequires: unzip
 %if 0%{?building_libffi:1}
 BuildRequires: pkg-config
 %endif
-%ifarch ia64
-BuildRequires: libunwind-devel
-%endif
 %if 0%{?run_tests:1}
 BuildRequires: dejagnu
 BuildRequires: expect
@@ -82,18 +74,8 @@ BuildRequires: gdb
 %endif
 
 # Define version number of libgcc_s
-%ifarch hppa
-%define libgcc_s 4
-%else
 %define libgcc_s 1
-%endif
-%ifarch ppc
-# We support building the nof libraries, but don't want this in the
-# regular rpms
 %define build_nof 0
-%else
-%define build_nof 0
-%endif
 
 %define separate_bi32 0
 %define separate_bi64 0
@@ -125,12 +107,12 @@ BuildRequires: gdb
 %define biarch_targets x86_64 
 
 URL:          http://gcc.gnu.org/
-Version: 4.7.2
+Version: 4.8.1
 Release:      1
 %define gcc_version %(echo %version | sed 's/_.*//')
 %define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1-2)
 %define snapshot_date %(echo %version | sed 's/[34]\.[0-9]\.[0-6]//' | sed 's/_/-/')
-%define binsuffix -4.7
+%define binsuffix -4.8
 # COMMON-END
 
 %if !0%{?building_libjava:1}%{?building_libffi:1}%{?building_testsuite:1}
@@ -151,18 +133,24 @@ Requires: libgomp@base_ver@ = %{version}-%{release}
 
 # COMMON-BEGIN
 BuildRoot:     %{_tmppath}/%{name}-%{version}-build
-Source:                gcc-%{gcc_version}%{snapshot_date}.tar.bz2
+#Source:               gcc-%{gcc_version}%{snapshot_date}.tar.bz2
+Source:     gcc-%{version}.tar.bz2
+
 Source1:       change_spec
-Source2:       libgcj47-rpmlintrc
-Source3:       gcc47-rpmlintrc
+Source2:       libgcj48-rpmlintrc
+Source3:       gcc48-rpmlintrc
 Source4:       ecj.jar
-Source5:       README.First-for.SuSE.packagers
 Source6:       baselibs.conf
+# Patches auto-generated by git-buildpackage:
+Patch0:     0001-dir-version.patch
+Patch1:     0002-textdomain.patch
+Patch2:     0003-rename-info-files.patch
+Patch3:     0004-ARM-linker.patch
 
 # GCC-TESTSUITE-DELETE-BEGIN
 # LIBFFI-DELETE-BEGIN
 # LIBJAVA-DELETE-BEGIN
-Group:         Development/Languages/C and C++
+Group:         Development/Toolchain
 Summary:       The GNU C Compiler and Support Files
 License:        GPL-3.0+
 
@@ -179,7 +167,7 @@ gcc-obj-c++.
 # COMMON-END
 %package -n gcc@base_ver@-32bit
 Summary:      The GNU C Compiler 32bit support
-Group:        Development/Languages/C and C++
+Group:        Development/Toolchain
 Requires: gcc@base_ver@ = %{version}-%{release}
 %if 0%{!?build_optional_compiler:1}
 Requires: libgcc%{libgcc_s}-32bit >= %{version}-%{release}
@@ -199,7 +187,7 @@ This package contains 32bit support for the GNU Compiler Collection.
 
 %package -n gcc@base_ver@-64bit
 Summary:      The GNU C Compiler 64bit support
-Group:        Development/Languages/C and C++
+Group:        Development/Toolchain
 Requires: gcc@base_ver@ = %{version}-%{release}
 %if 0%{!?build_optional_compiler:1}
 Requires: libgcc%{libgcc_s}-64bit >= %{version}-%{release}
@@ -221,7 +209,7 @@ This package contains 64bit support for the GNU Compiler Collection.
 %package locale
 Summary:      Locale Data for the GNU Compiler Collection
 License:        GPL-3.0+
-Group:        Development/Languages/C and C++
+Group:        Development/Toolchain
 Requires: gcc@base_ver@ = %{version}-%{release}
 
 %description locale
@@ -232,7 +220,7 @@ in the current locale.
 %package c++
 Summary:      The GNU C++ Compiler
 License:        GPL-3.0+
-Group:        Development/Languages/C and C++
+Group:        Development/Toolchain
 Requires: gcc@base_ver@ = %{version}-%{release}
 Requires: libstdc++@base_ver@-devel = %{version}-%{release}
 
@@ -243,16 +231,13 @@ This package contains the GNU compiler for C++.
 %package -n libstdc++@base_ver@-devel@variant@
 Summary:      Include Files and Libraries mandatory for Development
 License:        GPL-3.0-with-GCC-exception
-Group:        Development/Languages/C and C++
+Group:        Development/Toolchain
 %if 0%{!?build_optional_compiler:1}
 Requires: libstdc++6@variant@ >= %{version}-%{release}
 %else
 Requires: libstdc++@base_ver@@variant@ = %{version}-%{release}
 %endif
 Requires: glibc-devel@variant@
-%ifarch ia64
-Requires: libunwind-devel
-%endif
 
 %description -n libstdc++@base_ver@-devel@variant@
 This package contains all the headers and libraries of the standard C++
@@ -262,7 +247,7 @@ library. It is needed for compiling C++ code.
 %package -n libstdc++@base_ver@-doc
 Summary:      Documentation for the GNU C++ standard library
 License:        GPL-3.0+
-Group:        Documentation/HTML
+Group:        Documentation
 BuildArch:    noarch
 
 %description -n libstdc++@base_ver@-doc
@@ -273,7 +258,7 @@ Extensive HTML documentation for the GNU C++ standard library.
 %package -n libgcc@base_ver@@variant@
 Summary:      C compiler runtime library
 License:        GPL-3.0-with-GCC-exception
-Group:        System/Base
+Group:        Base/Libraries
 %if 0%{!?build_optional_compiler:1}
 Provides: libgcc%{libgcc_s}@variant@ = %{version}-%{release}
 Conflicts: libgcc%{libgcc_s}@variant@ < %{version}-%{release}
@@ -295,7 +280,7 @@ Libgcc is needed for dynamically linked C programs.
 %package -n libgomp@base_ver@@variant@
 Summary:      The GNU compiler collection OpenMP runtime library
 License:        GPL-3.0-with-GCC-exception
-Group:        System/Base
+Group:        Base/Libraries
 %if 0%{!?build_optional_compiler:1}
 Provides: libgomp1@variant@ = %{version}-%{release}
 Conflicts: libgomp1@variant@ < %{version}-%{release}
@@ -321,7 +306,7 @@ option.
 %package -n libstdc++@base_ver@@variant@
 Summary:      The standard C++ shared library
 License:        GPL-3.0-with-GCC-exception
-Group:        System/Libraries
+Group:        Base/Libraries
 %if 0%{!?build_optional_compiler:1}
 Provides: libstdc++6@variant@ = %{version}-%{release}
 Conflicts: libstdc++6@variant@ < %{version}-%{release}
@@ -344,7 +329,7 @@ The standard C++ library, needed for dynamically linked C++ programs.
 %package info
 Summary:      Documentation for the GNU compiler collection
 License:      GFDL-1.2
-Group:        Documentation/Other
+Group:        Documentation
 BuildArch:    noarch
 
 %description info
@@ -356,7 +341,7 @@ and internals documentation.
 %package objc@variant@
 Summary:      GNU Objective C Compiler
 License:        GPL-3.0+
-Group:        Development/Languages/Other
+Group:        Development/Toolchain
 Requires: gcc@base_ver@ = %{version}-%{release}
 Requires: libobjc2@variant@ >= %{version}-%{release}
 
@@ -387,7 +372,7 @@ The library for the GNU Objective C compiler.
 %package obj-c++
 Summary:      GNU Objective C++ Compiler
 License:        GPL-3.0+
-Group:        Development/Languages/Other
+Group:        Development/Toolchain
 Requires: gcc@base_ver@-objc = %{version}-%{release}
 Requires: gcc@base_ver@-c++ = %{version}-%{release}
 
@@ -400,7 +385,7 @@ Nextstep OS. The source code is available in the gcc package.
 %package -n cpp@base_ver@
 Summary:      The GCC Preprocessor
 License:        GPL-3.0+
-Group:        Development/Languages/C and C++
+Group:        Development/Toolchain
 
 %description -n cpp@base_ver@
 This Package contains just the preprocessor that is used by the X11
@@ -411,7 +396,7 @@ packages.
 %package ada@variant@
 Summary:      GNU Ada95 Compiler Based on GCC (GNAT)
 License:        GPL-3.0+
-Group:        Development/Languages/Other
+Group:        Development/Toolchain
 Requires: gcc@base_ver@@variant@ = %{version}-%{release}
 Requires: libada@base_ver@@variant@ = %{version}-%{release}
 
@@ -427,10 +412,10 @@ must have installed a binary version to bootstrap the compiler.
 Summary:      GNU Ada Runtime Libraries
 License:      GPL-3.0-with-GCC-exception
 Group:        System/Libraries
-Provides: libgnarl-4_7@variant@ = %{version}-%{release}
-Conflicts: libgnarl-4_7@variant@ < %{version}-%{release}
-Provides: libgnat-4_7@variant@ = %{version}-%{release}
-Conflicts: libgnat-4_7@variant@ < %{version}-%{release}
+Provides: libgnarl-4_8@variant@ = %{version}-%{release}
+Conflicts: libgnarl-4_8@variant@ < %{version}-%{release}
+Provides: libgnat-4_8@variant@ = %{version}-%{release}
+Conflicts: libgnat-4_8@variant@ < %{version}-%{release}
 
 %description -n libada@base_ver@@variant@
 This package contains the shared libraries required to run programs
@@ -526,7 +511,7 @@ operations.
 %package -n libmudflap@base_ver@@variant@
 Summary:      The Mudflap Extension Runtime Library
 License:        GPL-3.0-with-GCC-exception
-Group:        Development/Languages/C and C++
+Group:        Development/Toolchain
 Provides: libmudflap0@variant@ = %{version}-%{release}
 Conflicts: libmudflap0@variant@ < %{version}-%{release}
 Provides: libmudflapth0@variant@ = %{version}-%{release}
@@ -570,7 +555,7 @@ Source code for this package is in gcc.
 %package -n gcc@base_ver@-java
 Summary:      The GNU Java Compiler
 License:        GPL-3.0+
-Group:        Development/Languages/Java
+Group:        Development/Languages
 Requires: gcc@base_ver@ = %{version}
 Requires: libgcj@base_ver@-devel = %{version}-%{release}
 
@@ -581,7 +566,7 @@ The Java compiler from the GCC-tools-suite.
 %package -n libgcj_bc@base_ver@
 Summary:      Fake library for BC-ABI compatibility.
 License:        GPL-2.0-with-classpath-exception
-Group:        Development/Libraries/Java
+Group:        Development/Libraries
 Provides: libgcj_bc1 = %{version}-%{release}
 Conflicts: libgcj_bc1 < %{version}-%{release}
 # libgcj_bc is special in that it just contains a symlink to
@@ -614,7 +599,7 @@ These are the jar files that go along with the gcj front end to gcc.
 %package -n libgcj@base_ver@-devel
 Summary:      Include Files and Libraries mandatory for Development.
 License:        GPL-2.0-with-classpath-exception
-Group:        Development/Libraries/Java
+Group:        Development/Libraries
 Requires: libstdc++@base_ver@-devel = %{version}
 Requires: libgcj%{gcj_sover} >= %{version}-%{release}
 Requires: libgcj_bc1 >= %{version}-%{release}
@@ -623,9 +608,6 @@ Requires: gtk2-devel
 Requires: libart_lgpl-devel
 Requires: glibc-devel
 Requires: zlib-devel
-%ifarch ia64
-Requires: libunwind-devel
-%endif
 
 %description -n libgcj@base_ver@-devel
 This package contains all necessary include files and libraries needed
@@ -635,7 +617,7 @@ to develop applications that require these.
 %package -n gcc@base_ver@-gij
 Summary:      Java Bytecode Interpreter for gcc
 License:      GPL-2.0-with-classpath-exception
-Group:        Development/Libraries/Java
+Group:        Development/Libraries
 Requires: libgcj%{gcj_sover} >= %{version}-%{release}
 
 %description -n gcc@base_ver@-gij
@@ -646,7 +628,7 @@ This package contains the java bytecode interpreter gij and related tools.
 %package -n libffi@base_ver@@variant@
 Summary:      Foreign Function Interface library
 License:        BSD-3-Clause
-Group:        Development/Languages/C and C++
+Group:        Base/Libraries
 Provides: g-wrap:/usr/lib/libffi.so.4
 Provides: libffi4@variant@ = %{version}-%{release}
 Conflicts: libffi4@variant@ < %{version}-%{release}
@@ -665,7 +647,7 @@ A foreign function interface is the popular name for the interface that allows c
 %package -n libffi@base_ver@-devel@variant@
 Summary:      Foreign Function Interface library development files
 License:        BSD 3-Clause
-Group:        Development/Languages/C and C++
+Group:        Development/Toolchain
 Requires: libffi4@variant@ >= %{version}-%{release}
 Provides: libffi-devel@variant@ = %{version}-%{release}
 Conflicts: libffi-devel@variant@ < %{version}-%{release}
@@ -677,8 +659,8 @@ A foreign function interface is the popular name for the interface that allows c
 %package -n gcc@base_ver@-testresults
 # GCC-TESTSUITE-DELETE-END
 Summary:      Testsuite results
-License:       SUSE-Public-Domain
-Group:        Development/Languages/C and C++
+License:       Public-Domain
+Group:        Development/Toolchain
 
 %description -n gcc@base_ver@-testresults
 Results from running the gcc and target library testsuites.
@@ -835,7 +817,13 @@ Results from running the gcc and target library testsuites.
 # COMMON-BEGIN
 
 %prep
-%setup -q -n gcc-%{gcc_version}%{snapshot_date}
+#%setup -q -n gcc-%{gcc_version}%{snapshot_date}
+%setup -q -n gcc-%{version}
+# 0001-dir-version.patch
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
 
 %build
 # Avoid rebuilding of generated files
@@ -1012,12 +1000,8 @@ TCFLAGS="$RPM_OPT_FLAGS" GCJFLAGS="$RPM_OPT_FLAGS" \
 %else
        --program-suffix=%{binsuffix} \
        --enable-linux-futex \
-%ifarch ia64
-       --with-system-libunwind \
-%else
        --without-system-libunwind \
 %endif
-%endif
 %if "%{TARGET_ARCH}" == "armv5tel"
        --with-arch=armv5te \
        --with-float=soft \
@@ -1058,7 +1042,7 @@ make stage1-bubble $PARALLEL
 make all-target-libffi $PARALLEL
 %else
 # Only run profiled bootstrap on archs where it works
-#%ifarch %ix86 x86_64 ppc ppc64 ia64
+#%ifarch %ix86 x86_64 
 #make profiledbootstrap-lean STAGE1_CFLAGS="-O -g" BOOT_CFLAGS="$RPM_OPT_FLAGS" $PARALLEL
 #%else
 %ifarch %arm
@@ -1435,9 +1419,6 @@ crt32_list=$RPM_BUILD_ROOT%{versmainlibdirbi32}/crt*.o
 crt64_list=$RPM_BUILD_ROOT%{versmainlibdirbi64}/crt*.o
 %endif
 %endif
-for o in $crt_list $crt32_list $crt64_list; do
-  objcopy -R ".comment.SUSE.OPTs" $o
-done
 %endif
 
 %if 0%{?building_libjava:1}
@@ -1579,6 +1560,7 @@ cd ..
 
 
 %files
+%license COPYING  COPYING3  COPYING3.LIB  COPYING.LIB  COPYING.RUNTIME
 %defattr(-,root,root)
 %dir %{_libdir}/gcc
 %dir %{_libdir}/gcc/%{GCCDIST}
@@ -1614,7 +1596,6 @@ cd ..
 %{libsubdir}/include/stdbool.h
 %{libsubdir}/include/stdfix.h
 %{libsubdir}/include/stddef.h
-%{libsubdir}/include/uchar.h
 %{libsubdir}/include/unwind.h
 %{libsubdir}/include/varargs.h
 %{libsubdir}/include/stdint.h
@@ -1877,26 +1858,7 @@ cd ..
 
 %files info
 %defattr(-,root,root)
-%doc %{_infodir}/cpp%{binsuffix}.info*.gz
-%doc %{_infodir}/cppinternals%{binsuffix}.info*.gz
-%doc %{_infodir}/gcc%{binsuffix}.info*.gz
-%doc %{_infodir}/gccint%{binsuffix}.info*.gz
-%doc %{_infodir}/gccinstall%{binsuffix}.info*.gz
-%doc %{_infodir}/libgomp%{binsuffix}.info*.gz
-%if %{build_fortran}
-%doc %{_infodir}/gfortran%{binsuffix}.info*.gz
-%ifarch %quadmath_arch
-%doc %{_infodir}/libquadmath%{binsuffix}.info*.gz
-%endif
-%endif
-%if %{build_java}
-%doc %{_infodir}/gcj%{binsuffix}.info*.gz
-%endif
-%if %{build_ada}
-%doc %{_infodir}/gnat-style%{binsuffix}.info*gz
-%doc %{_infodir}/gnat_rm%{binsuffix}.info*gz
-%doc %{_infodir}/gnat_ugn%{binsuffix}.info*gz
-%endif
+%doc %{_infodir}/*.gz
 
 %files -n cpp@base_ver@
 %defattr(-,root,root)