[Mesa-dev] [RFC 6/8] mesa: remove support for GCC older than 4.1.0
Matt Turner
mattst88 at gmail.com
Wed Dec 17 07:39:21 PST 2014
On Wed, Dec 17, 2014 at 7:28 AM, Jonathan Gray <jsg at jsg.id.au> wrote:
> On Thu, Dec 18, 2014 at 12:26:10AM +1100, Timothy Arceri wrote:
>> On Tue, 2014-12-16 at 22:58 -0800, Vinson Lee wrote:
>> > On Mon, Dec 15, 2014 at 6:23 PM, Jonathan Gray <jsg at jsg.id.au> wrote:
>> > > On Sat, Dec 13, 2014 at 09:09:27PM +1100, Timothy Arceri wrote:
>> > >> On Fri, 2014-12-12 at 07:01 -0600, kallisti5 wrote:
>> > >> > On 2014-12-12 05:46, Timothy Arceri wrote:
>> > >> > > Signed-off-by: Timothy Arceri <t_arceri at yahoo.com.au>
>> > >> > > ---
>> > >> > > src/mesa/main/compiler.h | 2 +-
>> > >> > > 1 file changed, 1 insertion(+), 1 deletion(-)
>> > >> > >
>> > >> > > diff --git a/src/mesa/main/compiler.h b/src/mesa/main/compiler.h
>> > >> > > index 34671dc..cdc843d 100644
>> > >> > > --- a/src/mesa/main/compiler.h
>> > >> > > +++ b/src/mesa/main/compiler.h
>> > >> > > @@ -122,7 +122,7 @@ extern "C" {
>> > >> > > * inline a static function that we later use in an alias. - ajax
>> > >> > > */
>> > >> > > #ifndef PUBLIC
>> > >> > > -# if (defined(__GNUC__) && __GNUC__ >= 4) || (defined(__SUNPRO_C) &&
>> > >> > > (__SUNPRO_C >= 0x590))
>> > >> > > +# if defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >=
>> > >> > > 0x590))
>> > >> > > # define PUBLIC __attribute__((visibility("default")))
>> > >> > > # define USED __attribute__((used))
>> > >> > > # else
>> > >> >
>> > >> > Why not also drop the SUNPRO_C version check?
>> > >> >
>> > >> > # if defined(__GNUC__) || defined(__SUNPRO_C)
>> > >> >
>> > >> > I downloaded SunStudio 12 (circa 2007) and __SUNPRO_C is set to 0x590.
>> > >> > If we drop support for GCC 4.1 (2007), might as well drop older sun
>> > >> > compilers.
>> > >>
>> > >>
>> > >> The series is dropping support for GCC 4.0. 4.1 is shipped with Redhat
>> > >> Enterprise Linux 5 which is still in support so I've set that as the
>> > >> minimum version.
>> > >
>> > > It is worth pointing out OpenBSD ships a patched GCC 4.2.1 as the base
>> > > compiler as that was the last GPLv2 licensed version. Not relevant this
>> > > time, perhaps it will be next time.
>> > > _______________________________________________
>> > > mesa-dev mailing list
>> > > mesa-dev at lists.freedesktop.org
>> > > http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>> >
>> >
>> > Latest master doesn't build with GCC 4.1.
>> >
>> > glsl/ir_uniform.h:45: error: use of enum ???gl_uniform_driver_format???
>> > without previous declaration
>>
>> My reasoning for using 4.1 seems to be flawed as RHEL 5 comes with
>> autoconf 2.59 by default and current Mesa requires 2.60. Maybe bumping
>> GCC to 4.2 would be better. I assume the above issue doesn't happen on
>> 4.2 since OpenBSD uses it?
>
> I don't see that error with master here.
>
> The problem seems to be the use of an attribute on the enum which going
> by https://gcc.gnu.org/gcc-4.2/changes.html is only supported after 4.2.0?
Indeed, and that code has been in place since June and no one has
complained as far as I can tell.
I'm okay with bumping the minimum to 4.2. We're already using
__attribute__((packed)) on enums in a number of places in the i965
driver.
More information about the mesa-dev
mailing list