[PATCH] Actually set TYPE_PACKED for type_record

2022-06-18 Thread Mark Wielaard
When bootstrapping with --enable-checking=no you'll get:

gcc/rust/backend/rust-compile-type.cc: In member function
‘virtual void Rust::Compile::TyTyResolveCompile::visit(const 
Rust::TyTy::ADTType&)’:
gcc/tree.h:2312:59: error: statement has no effect [-Werror=unused-value]
 2312 | #define TYPE_PACKED(NODE) (TYPE_CHECK (NODE)->base.u.bits.packed_flag)
  |   ^~~~
gcc/rust/backend/rust-compile-type.cc:315:7:
  note: in expansion of macro ‘TYPE_PACKED’
  315 |   TYPE_PACKED (type_record);
  |   ^~~

We need to actually set a value for the packed_flag.
---

https://code.wildebeest.org/git/user/mjw/gccrs/commit/?h=packed

 gcc/rust/backend/rust-compile-type.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/rust/backend/rust-compile-type.cc 
b/gcc/rust/backend/rust-compile-type.cc
index 240abe0497e..eced909673e 100644
--- a/gcc/rust/backend/rust-compile-type.cc
+++ b/gcc/rust/backend/rust-compile-type.cc
@@ -312,7 +312,7 @@ TyTyResolveCompile::visit (const TyTy::ADTType &type)
   TyTy::ADTType::ReprOptions repr = type.get_repr_options ();
   if (repr.pack)
 {
-  TYPE_PACKED (type_record);
+  TYPE_PACKED (type_record) = 1;
   if (repr.pack > 1)
{
  SET_TYPE_ALIGN (type_record, repr.pack * 8);
-- 
2.30.2

-- 
Gcc-rust mailing list
Gcc-rust@gcc.gnu.org
https://gcc.gnu.org/mailman/listinfo/gcc-rust


gccrust debian stable bootstrap builder (Was: ☝ Buildbot (GNU Toolchain): gccrust - worker cancelled (master))

2022-06-18 Thread Mark Wielaard
Hi Philip,

CC buildbot mailinglist - please report any issues with the new
builder there.

On Tue, May 24, 2022 at 10:29:34AM +0100, Philip Herron wrote:
> A full bootstrap once a day might be nice to have actually. I wonder
> how long it will take on this build bot.

It takes ~20 minutes (using 8 vcpus). I made it so that it waits for
10 minutes before doing a bootstrap build. The builder also collapses
any pending builds. So it should do a bootstrap build fairly
regularly, but not for each individual commit. It also only runs on
debian amd64 stable for now.

> Hopefully, the bots don't unionize and go on strike for being overworked :).

No worries, we should get a bigger machine next week where we can use
more vcpus per build. And we should also get a larger arm64 box (the
current gccrs builds on arm64 have been disabled because the little
arm64 board just couldn't keep up).

Cheers,

Mark
>From 65cd2f861528d5ef59f594c7c8372975562abad4 Mon Sep 17 00:00:00 2001
From: Mark Wielaard 
Date: Sun, 19 Jun 2022 02:03:18 +0200
Subject: [PATCH 1/2] Add gccrs debian-stable bootstrap builder

Add a new gccrust-bootstrap Scheduler with a treeStableTimer of 10
minutes. Share gccrust steps between a CI gccrust_factory and a new
gccrust_bootstrap_factory. The only difference is the configure step
enable-boostrap and enable-checking=no.

The gccrust-bootstrap-debian-amd64 builder has collapseRequests=True
and gccrust-bootstrap as tag. The gccrust-bootstrap tag problem
reports are sent separately from the CI gccrust builder (gccrust tag)
reports.
---
 builder/master.cfg | 116 ++---
 1 file changed, 99 insertions(+), 17 deletions(-)

diff --git a/builder/master.cfg b/builder/master.cfg
index 7e28ea9..dc5c583 100644
--- a/builder/master.cfg
+++ b/builder/master.cfg
@@ -412,6 +412,17 @@ gccrust_scheduler = schedulers.SingleBranchScheduler(
   "gccrust-opensuseleap-x86_64"])
 c['schedulers'].append(gccrust_scheduler)
 
+gccrust_bootstrap_scheduler = schedulers.SingleBranchScheduler(
+name="gccrust-bootstrap",
+change_filter=util.ChangeFilter(project="gccrust",
+branch="master"),
+fileIsImportant=gccrsImportant,
+onlyImportant=True,
+treeStableTimer=10*60,
+reason="gccrust project master branch gccrs files update",
+builderNames=["gccrust-bootstrap-debian-amd64"])
+c['schedulers'].append(gccrust_bootstrap_scheduler)
+
 # Only trigger scheduler for changes to binutils (or deps)
 binutils_files = ["bfd/",
   "binutils/", "gas/", "ld/",
@@ -1165,53 +1176,95 @@ elfutils_opensuseleap_x86_64_builder = util.BuilderConfig(
 factory=elfutils_factory_distcheck)
 c['builders'].append(elfutils_opensuseleap_x86_64_builder)
 
-# elfutils build steps, factory and builders
+# gccrust build steps, factory and builders
 # All steps are custom because of the workdir settings
 
-gccrust_factory = util.BuildFactory()
-gccrust_factory.addStep(steps.Git(
+gccrust_git_step = steps.Git(
 workdir='gccrs',
 repourl=gccrust_repourl,
 mode='full', method='fresh',
 retryFetch=True,
 name="git checkout",
-haltOnFailure=True))
-gccrust_factory.addStep(steps.ShellCommand(
+haltOnFailure=True)
+
+gccrust_rm_build_step = steps.ShellCommand(
 command=["rm", "-rf",
  util.Interpolate ("%(prop:builddir)s/gccrs-build")],
 name="rm -rf gccrs-build",
-haltOnFailure=True))
-gccrust_factory.addStep(steps.Configure(
+haltOnFailure=True)
+
+gccrust_configure_step = steps.Configure(
 workdir='gccrs-build',
 command=['../gccrs/configure',
  '--disable-bootstrap',
  '--enable-languages=rust',
  '--enable-checking=yes',
- '--disable-multilib'],
+ '--disable-multilib',
+ '--disable-libsanitizer',
+ '--disable-libitm',
+ '--disable-libgomp',
+ '--disable-libcc1',
+ '--disable-libvtv'],
 name='configure',
-haltOnFailure=True))
-gccrust_factory.addStep(steps.Compile(
+haltOnFailure=True)
+
+gccrust_configure_bootstrap_step = steps.Configure(
+workdir='gccrs-build',
+command=['../gccrs/configure',
+ '--enable-bootstrap',
+ '--enable-languages=rust',
+ '--enable-checking=no',
+ '--disable-multilib',
+ '--disable-libsanitizer',
+ '--disable-libitm',
+ '--disable-libgomp',
+ '--disable-libcc1',
+ '--disable-libvtv'],
+name='configure',
+haltOnFailure=True)
+
+gccrust_make_step = steps.Compile(
 workdir='gccrs-build',
 command=['make', util.Interpolate('-j%(prop:ncpus)s')],
 name='make',
-haltOnFailure=T