Bug 40785 - Powerpc bootstrap is broken due to problems in boehm-gc
Summary: Powerpc bootstrap is broken due to problems in boehm-gc
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: boehm-gc (show other bugs)
Version: 4.5.0
: P3 normal
Target Milestone: 4.5.0
Assignee: Michael Meissner
URL:
Keywords: build
Depends on:
Blocks:
 
Reported: 2009-07-17 14:49 UTC by Michael Meissner
Modified: 2009-09-26 19:48 UTC (History)
3 users (show)

See Also:
Host: powerpc64-unknown-linux-gnu
Target: powerpc64-unknown-linux-gnu
Build: powerpc64-unknown-linux-gnu
Known to work:
Known to fail:
Last reconfirmed:


Attachments
Patch to use sync builtins if we can, and fix asm constraints if we have an older compiler (1010 bytes, patch)
2009-07-17 14:53 UTC, Michael Meissner
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Meissner 2009-07-17 14:49:15 UTC
The test and set locks in boehm-gc/include/private/gc_locks.h have invalid asm for creating the test and set locks and the current Powerpc GCC compiler generates errors when enabling java in a bootstrap.

In addition, GCC 4.4 has added the __sync_lock_test_and_set and __sync_lock_release builtins which abstract these functions, so the asm is not needed for 4.4 and beyond.
Comment 1 Michael Meissner 2009-07-17 14:53:03 UTC
Created attachment 18213 [details]
Patch to use sync builtins if we can, and fix asm constraints if we have an older compiler
Comment 2 Andrew Pinski 2009-09-26 19:48:36 UTC
Fixed.
2009-07-17  Michael Meissner  <meissner@linux.vnet.ibm.com>

        PR boehm-gc/40785
        * include/private/gc_locks.h (GC_test_and_set): If GCC 4.4, use
        the __sync_lock_test_and _set and __sync_lock_release builtins on
        the powerpc.  If not GCC 4.4, fix up the constraints so that it
        builds without error.
        (GC_clear): Ditto.