Project

General

Profile

Bug #2732

consistent use of #pragma align would please GCC

Added by Rich Lowe over 8 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
kernel
Start date:
2012-05-14
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:

Description

Right now, we patch GCC to accept #pragma align after a declaration, as well as before. It's not a big patch, and it makes it more consistent with studio but, given that there's only really about 4 places in which we actually do this, and all of them are trivial to fix, it's easy enough to fix our code.


Files

palign.patch (2.87 KB) palign.patch Richard PALO, 2014-09-20 04:24 PM
#1

Updated by Rich Lowe over 8 years ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 50
#2

Updated by Richard PALO about 6 years ago

Actually, from what I see in the gate today, there is only one file actually needing therapy:
usr/src/uts/i86pc/io/fipe/fipe_pm.c

The attached patch should deal with that.

(the initial file list to check wasn't even half a page!)

#3

Updated by Rich Lowe about 6 years ago

So, I should have updated this bug and didn't.

The reason I never fixed this is that it turned out that while studio accepted a "late" pragma align, it didn't actually do anything with it. My notes say I intended to double check whether we wanted the behaviour the code appeared to specify, or the behaviour the compiler actually gave us.

I appear to have done neither.

I think, on balance, that what Richard has done is the right thing to do. I just wanted to make sure I noted this in the bug (as I should have done at the time).

#4

Updated by Richard PALO almost 6 years ago

Is this waiting on me to prepare a webrev?
I've been running with this patch now since 20/09/2014 without issue.

#5

Updated by Rich Lowe almost 6 years ago

Yes.

#6

Updated by Electric Monk almost 6 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 50 to 100

git commit 90b1de135fcfa7ce4adc9138a885aa94bbcef04f

commit  90b1de135fcfa7ce4adc9138a885aa94bbcef04f
Author: Richard PALO <richard@NetBSD.org>
Date:   2014-12-01T16:29:56.000Z

    2732 consistent use of #pragma align would please GCC
    Reviewed by: Richard Lowe <richlowe@richlowe.net>
    Approved by: Dan McDonald <danmcd@omniti.com>

Also available in: Atom PDF