2000-12-31 01:15:53

by J Sloan

[permalink] [raw]
Subject: Re: tdfx.o and -test13

Dieter N?tzel wrote:

> It haven't loaded since test13-pre1 for me.
> Only the 'module version' was broken.
> Last test12-pre7 was fine, here.
> It was introduced with the Makefile cleanups.
>
> --- linux/drivers/char/drm/drmP.old Thu Dec 28 16:27:34 2000
> +++ linux/drivers/char/drm/drmP.h Sat Dec 23 13:57:08 2000
> @@ -40,6 +40,7 @@
> #include <asm/current.h>
> #endif /* __alpha__ */
> #include <linux/config.h>
> +#include <linux/modversions.h>
> #include <linux/module.h>
> #include <linux/kernel.h>
> #include <linux/miscdevice.h>

I just want to confirm that this small fix solves my drm
problems as well - currently running -test13-pre7

Er, has anybody sent a patch to the maintainers?

jjs





2000-12-31 01:34:02

by Alan

[permalink] [raw]
Subject: Re: tdfx.o and -test13

> > +#include <linux/modversions.h>
> > #include <linux/module.h>
> > #include <linux/kernel.h>
> > #include <linux/miscdevice.h>
>
> I just want to confirm that this small fix solves my drm
> problems as well - currently running -test13-pre7
>
> Er, has anybody sent a patch to the maintainers?

Wrong patch. Modversions.h should be getting automatically included. That
is what needs fixing. You've nicely located the problem and fixed the symptoms
for the module versioned case

2000-12-31 01:38:52

by Frank Jacobberger

[permalink] [raw]
Subject: Re: tdfx.o and -test13

Alan Cox wrote:

> > > +#include <linux/modversions.h>
> > > #include <linux/module.h>
> > > #include <linux/kernel.h>
> > > #include <linux/miscdevice.h>
> >
> > I just want to confirm that this small fix solves my drm
> > problems as well - currently running -test13-pre7
> >
> > Er, has anybody sent a patch to the maintainers?
>
> Wrong patch. Modversions.h should be getting automatically included. That
> is what needs fixing. You've nicely located the problem and fixed the symptoms
> for the module versioned case

This "patch" apparently has been around since test13-pre1. I guess the
maintainers are on vacation.

Frank


2000-12-31 15:53:26

by Tony Hoyle

[permalink] [raw]
Subject: Re: tdfx.o and -test13

Alan Cox wrote:
> Wrong patch. Modversions.h should be getting automatically included. That
> is what needs fixing. You've nicely located the problem and fixed the symptoms
> for the module versioned case
>
modversions.h is being included in the 'gcc' line, however something is
overriding it
in the case of the agpsupport.c file. If you move the include
<linux/modversions.h> to
the top of agpsupport.c it also works correctly.

Tony

--
Can't think of a decent signature...

[email protected] http://www.nothing-on.tv

2000-12-31 23:08:01

by Tony Hoyle

[permalink] [raw]
Subject: Re: tdfx.o and -test13

Tony Hoyle wrote:
> modversions.h is being included in the 'gcc' line, however something is
> overriding it
> in the case of the agpsupport.c file. If you move the include
> <linux/modversions.h> to
> the top of agpsupport.c it also works correctly.

OK ignore the above.... putting it in agpsupport doesn't fix it.

My kernel tree went a bit T-zone after I did that. Even removing the
fix totally generated
a completely working module! I had to 'make distclean' to restore the
old (buggy) behaviour.

Possibly something in the auto-dependencies? Unfortunately I don't have
the info files for gcc so
I can't work out why the '-include' directive would be
overridden/ignored.

Tony

--
Can't think of a decent signature...

[email protected] http://www.nothing-on.tv

2000-12-31 23:12:41

by Alan

[permalink] [raw]
Subject: Re: tdfx.o and -test13

> Possibly something in the auto-dependencies? Unfortunately I don't have
> the info files for gcc so
> I can't work out why the '-include' directive would be
> overridden/ignored.

Im wondering if it is make dependant. It seems to be working here

2000-12-31 23:20:32

by Tony Hoyle

[permalink] [raw]
Subject: Re: tdfx.o and -test13

Alan Cox wrote:
>
> > Possibly something in the auto-dependencies? Unfortunately I don't have
> > the info files for gcc so
> > I can't work out why the '-include' directive would be
> > overridden/ignored.
>
> Im wondering if it is make dependant. It seems to be working here

Well I'm on:

make 3.79.1
gcc 2.95.2 20000220
ld 2.10.91
modversions 2.3.23

Tony

--
Can't think of a decent signature...

[email protected] http://www.nothing-on.tv

2000-12-31 23:29:45

by Alan

[permalink] [raw]
Subject: Re: tdfx.o and -test13

> make 3.79.1

Ditto

> gcc 2.95.2 20000220
gcc version 2.96 20000731 (Red Hat Linux 7.0)

and I really can't see that being relevant

> ld 2.10.91
GNU ld version 2.10.90 (with BFD 2.10.0.18)

> modversions 2.3.23
insmod version 2.3.21

I see modversions.h being included properly on the command line

Alan

2001-01-01 00:11:19

by Tony Hoyle

[permalink] [raw]
Subject: Re: tdfx.o and -test13

Alan Cox wrote:
>
> I see modversions.h being included properly on the command line

Me too..

make[3]: Entering directory `/usr/src/linux/drivers/char/drm'
gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -O2
-fomit-frame-pointer -fno-strict-aliasing -pipe
-mpreferred-stack-boundary=2 -march=i686 -DMODULE -DMODVERSIONS -include
/usr/src/linux/include/linux/modversions.h -c -o agpsupport.o
agpsupport.c
In file included from agpsupport.c:1:
/usr/src/linux/include/linux/modversions.h:3: warning: ignoring pragma:
"Modversions included

Modversions *is* being included... putting a message into the header
file shows it to be correctly included at compile time. However by the
time the C file is processed it the symbols it has defined appear to no
longer exist. When you put the patch into drmP.h it never re-includes
modversions (the pragma is not hit, because _LINUX_MODVERSIONS_H is
already defined) *but* the macros within it suddenly become active.

I'm confused!

Preprocessor bug? Demon possessed compiler?

Tony (still coding at 20 minutes to midnight --- sad or what?)

--
Can't think of a decent signature...

[email protected] http://www.nothing-on.tv

2001-01-01 00:43:29

by Frank Jacobberger

[permalink] [raw]
Subject: Re: tdfx.o and -test13

Tony Hoyle wrote:

> Alan Cox wrote:
> >
> > I see modversions.h being included properly on the command line
>
> Me too..
>
> make[3]: Entering directory `/usr/src/linux/drivers/char/drm'
> gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -O2
> -fomit-frame-pointer -fno-strict-aliasing -pipe
> -mpreferred-stack-boundary=2 -march=i686 -DMODULE -DMODVERSIONS -include
> /usr/src/linux/include/linux/modversions.h -c -o agpsupport.o
> agpsupport.c
> In file included from agpsupport.c:1:
> /usr/src/linux/include/linux/modversions.h:3: warning: ignoring pragma:
> "Modversions included
>
> Modversions *is* being included... putting a message into the header
> file shows it to be correctly included at compile time. However by the
> time the C file is processed it the symbols it has defined appear to no
> longer exist. When you put the patch into drmP.h it never re-includes
> modversions (the pragma is not hit, because _LINUX_MODVERSIONS_H is
> already defined) *but* the macros within it suddenly become active.
>
> I'm confused!
>
> Preprocessor bug? Demon possessed compiler?

No, the pre-y2k+1 bug of course.