Re: ppc32 kernel/zaptel missing symbol & turn off -fstack-protector

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2006-02-22 at 23:13 +0100, Patrick wrote:
> On Wed, 2006-02-22 at 20:25 +0100, Arjan van de Ven wrote:
> > > One of the developers of Asterisk told me it is cause by
> > > -fstack-protector. This indeed shows up during the compilation of the
> > > zaptel kernel modules.
> > > 
> > > A sugesstion was to turn off -fstack-protector. Anyone have a hint how I
> > > do that in e.g. the rpm spec file?
> > 
> > 
> > if this rpm is using RPM cflags to build kernel modules it's terminally
> > broken..... kernel modules HAVE to use the EXACT flags the kernel
> > provides, but that is fully automatic if you have a "correct" 2.6 module
> > makefile (see Documentation/kbuild/ for details)
> 
> Thanks for the input. I may be a bit in over my head since I'm not
> exactly sure what you mean. Fwiw compilation of the zaptel modules works
> fine on FC4. Afaict the flags used in the zaptel Makefile are:
> 
> CFLAGS+=-I. $(RPM_OPT_FLAGS) -Wall -DBUILDING_TONEZONE
> LCFLAGS=-fPIC $(CFLAGS) -DBUILDING_TONEZONE
> KFLAGS=-I$(KINCLUDES) -O6
> KFLAGS+=-DMODULE -D__KERNEL__ -DEXPORT_SYMTAB -I$(KSRC)/drivers/net \
>         -Wall -I. -Wstrict-prototypes -fomit-frame-pointer -I
> $(KSRC)/drivers/net/wan -I$(KINCLUDES)/net
> ifneq (,$(wildcard $(KINCLUDES)/linux/modversions.h))
>   KFLAGS+=-DMODVERSIONS -include $(KINCLUDES)/linux/modversions.h
> endif
> KFLAGS_PPC:=$(shell if uname -m | grep -q ppc; then echo "-msoft-float
> -fsigned-char"; fi)
> KFLAGS+=$(KFLAGS_PPC)
> KFLAGS+=$(shell if uname -r | grep -q 2.4; then if uname -m | grep -q
> x86_64; then echo "-mcmodel=kernel"; fi; fi)
> 
> Is there anything in here that needs fixing or would the solution be
> something way more elaborate?

yes this is horked beyond belief and will lead to major miscompiles
(this will not generate correct modules even on x86, and is incorrect in
so many ways it's just not funny anymore).

just delete all of this; a kernel module makefile should be 1 or 2 lines
or so, maybe another example:

http://marc.theaimsgroup.com/?l=linux-ia64&m=105676403229397&w=2


-- 
fedora-test-list mailing list
fedora-test-list@xxxxxxxxxx
To unsubscribe: 
https://www.redhat.com/mailman/listinfo/fedora-test-list

[Index of Archives]     [Fedora Desktop]     [Fedora SELinux]     [Photo Sharing]     [Yosemite Forum]     [KDE Users]