allow building intermediate stages for gcc

Bug #603497 reported by Marcin Juszkiewicz
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gcc-4.4 (Ubuntu)
Fix Released
Undecided
Unassigned
gcc-4.5 (Ubuntu)
Fix Released
Undecided
Matthias Klose

Bug Description

Binary package hint: gcc-4.5

To bootstrap cross compiler we need support for building stage1/stage2 compiler.

I am working on a patch which adds DEB_STAGE variable which allow to build stage1 (static libgcc, no glibc yet) and stage2 (shared libgcc with minimal glibc).

Tags: patch
Revision history for this message
Marcin Juszkiewicz (hrw) wrote :

This patch is what I used to manually bootstrap cross compiler. It is not a thing to merge but rather code which shows what options I use.

I am working on merging that into normal packaging way so stage1 would be "DEB_STAGE=stage1 dpkg-buildpackage -b" command.

tags: added: patch
Revision history for this message
Marcin Juszkiewicz (hrw) wrote :

First version of clean "DEB_STAGE=stage1" way of support for stage1 gcc cross compilation.

Packaging needs work as binaries are named a bit different and are placed in other directories then expected.

Revision history for this message
Marcin Juszkiewicz (hrw) wrote :

Final version of stage1 patch.

Revision history for this message
Marcin Juszkiewicz (hrw) wrote :

This patch adds support for stage1 and stage2 of bootstrapping cross compiler.

Replaces previous versions.

Revision history for this message
Marcin Juszkiewicz (hrw) wrote :

This patch replaces all previous versions. Allows to build all stages.

Stage 3 will break on packaging due to lack of informations about libc6/target but thats out of scope for that bug.

Steve Langasek (vorlon)
Changed in gcc-4.5 (Ubuntu):
assignee: nobody → Matthias Klose (doko)
Revision history for this message
Matthias Klose (doko) wrote :

is this correct with a "REVERSE_CROSS" build?

@@ -245,10 +261,15 @@ with_common_libs := yes
 # XXX: should with_common_libs be "yes" only if this is the default compiler
 # version on the targeted arch?

-# build a -base package.
-ifneq ($(DEB_CROSS),yes)
- with_gccbase := yes
+ifndef DEB_STAGE
+ # build a -base package.
+ ifneq ($(DEB_CROSS),yes)
+ with_gccbase := yes
+ else
+ with_gccxbase := yes
+ endif
 endif
+
 # build dev packages.
 with_dev := yes

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gcc-4.4 - 4.4.4-8ubuntu2

---------------
gcc-4.4 (4.4.4-8ubuntu2) maverick; urgency=low

  * Update to the Linaro 4.4-2010.08-0 release on amd64, armel, i386
    and powerpc.
  * Update to SVN 20100813 from the gcc-4_4-branch (r163226).
    - Fix PR middle-end/45262, PR middle-end/41551, PR target/44805,
      PR tree-optimization/45109, PR boehm-gc/34544, PR target/44942,
      PR fortran/31588, PR fortran/43954 (closes: #576864), PR fortran/44660.

  [ Matthias Klose ]
  * Allow overwriting of the PF macro used in the build from the environment
    (Jim Heck). Closes: #588381.
  * Fix libc-dbg build dependency for java enabled builds. Addresses: #591424.
  * gnat-snapshot-build-fix.diff: Let gnat-4.4 build with gnat snapshots
    from the trunk (20100803).
  * gcj: Align data in .rodata.jutf8.* sections, patch taken from the trunk.
  * Add the complete packaging to the -source package. LP: #608650.
  * Drop the gcc-ix86-asm-generic32.diff patch.

  [ Steve Langasek ]
  * s,/lib/,/$(libdir)/, throughout debian/rules*; a no-op in the current
    case, but required for us to find the libraries when building for
    multiarch
  * Don't append multiarch paths to any multilib paths except for the default;
    our biarch (multilib) builds need to remain independent of multiarch in
    the near term, so we want to make sure we can find /usr/lib32 without
    /usr/lib/i486-linux-gnu being available.
  * debian/control.m4, debian/rules.conf: conditionally set packages to be
    Multi-Arch: yes when MULTIARCH is defined.

  [ Marcin Juszkiewicz ]
  * Allow building intermediate stages for cross builds. LP: #603497.
 -- Matthias Klose <email address hidden> Sat, 14 Aug 2010 18:07:52 +0200

Changed in gcc-4.4 (Ubuntu):
status: New → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gcc-4.5 - 4.5.1-1ubuntu2

---------------
gcc-4.5 (4.5.1-1ubuntu2) maverick; urgency=low

  * Build from the Linaro 4.5-2010.08-1 release on amd64, armel, i386
    and powerpc.
  * Update to SVN 20100813 (r163226) from the gcc-4_5-branch.
    - Fix PR target/41089, PR tree-optimization/44914, PR c++/45112,
      PR fortran/44929, PR middle-end/45262, PR debug/45259, PR debug/45055,
      PR target/44805, PR middle-end/45034, PR tree-optimization/45109,
      PR boehm-gc/34544, PR target/44942, PR fortran/31588, PR fortran/43954,
      PR fortran/44660, PR fortran/42051, PR fortran/44064, PR fortran/45151,
      PR libstdc++/44963.

  [ Matthias Klose ]
  * Allow overwriting of the PF macro used in the build from the environment
    (Jim Heck). Closes: #588381.
  * Fix libc-dbg build dependency for java enabled builds. Addresses: #591424.
  * gcj: Align data in .rodata.jutf8.* sections, patch taken from the trunk.
  * Configure with --enable-checking+release. LP: #612822.
  * Add the complete packaging to the -source package. LP: #608650.
  * Drop the gcc-ix86-asm-generic32.diff patch.

  [ Steve Langasek ]
  * s,/lib/,/$(libdir)/, throughout debian/rules*; a no-op in the current
    case, but required for us to find the libraries when building for
    multiarch
  * Don't append multiarch paths to any multilib paths except for the default;
    our biarch (multilib) builds need to remain independent of multiarch in
    the near term, so we want to make sure we can find /usr/lib32 without
    /usr/lib/i486-linux-gnu being available.
  * debian/control.m4, debian/rules.conf: conditionally set packages to be
    Multi-Arch: yes when MULTIARCH is defined.

  [ Marcin Juszkiewicz ]
  * Allow building intermediate stages for cross builds. LP: #603497.
 -- Matthias Klose <email address hidden> Sat, 14 Aug 2010 18:10:45 +0200

Changed in gcc-4.5 (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related blueprints

Remote bug watches

Bug watches keep track of this bug in other bug trackers.