Re: [PATCH 1/2] staging: brcm80211: assure common sources are truly common

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

 



On Tue, Jan 25, 2011 at 12:34:32PM +0100, Arend van Spriel wrote:
> Hi Greg,
> 
> On Tue, 25 Jan 2011 12:07:30 +0100, Greg KH <greg@xxxxxxxxx> wrote:
> 
> >On Sun, Jan 23, 2011 at 08:30:38AM +0100, Arend van Spriel wrote:
> >>Common code for brcm80211 drivers was resulting in different compiled
> >>object files for the drivers due to compilation flags. This has been
> >>aligned so that they are resulting in same object files. Kconfig now
> >>allows both drivers to be build simultaneously.
> >
> >I committed this patch, but now I wish I hadn't.
> >
> >It works when you build with only one process, but a simple:
> >	make -j8 M=drivers/staging/brcm80211/
> 
> Ah, I tested it with -j2 which was apparently not enough to cause a
> failure.
> 
> >will cause lots of fun races in the build system and break things with
> >errors that look like this:
> >
> >objdump:
> >'drivers/staging/brcm80211/brcmsmac/../util/.tmp_bcmutils.o': No
> >such file
> >mv: cannot stat
> >`drivers/staging/brcm80211/brcmsmac/../util/.tmp_bcmutils.o': No
> >such file or directory
> >make[2]: ***
> >[drivers/staging/brcm80211/brcmsmac/../util/bcmutils.o] Error 1
> >make[2]: *** Waiting for unfinished jobs....
> >  LD [M]  drivers/staging/brcm80211/brcmfmac/brcmfmac.o
> >objdump:
> >'drivers/staging/brcm80211/brcmsmac/../util/.tmp_hndpmu.o': No
> >such file
> >mv: cannot stat
> >`drivers/staging/brcm80211/brcmsmac/../util/.tmp_hndpmu.o': No
> >such file or directory
> >make[2]: *** [drivers/staging/brcm80211/brcmsmac/../util/hndpmu.o]
> >Error 1
> >make[1]: *** [drivers/staging/brcm80211/brcmsmac] Error 2
> >make: *** [_module_drivers/staging/brcm80211] Error 2
> >
> >Not nice :(
> >
> >The problem is that you are trying to build the same file from multiple
> >directories at the same time.
> >
> >Instead, for now, "cheat" and have a .c file that includes the common .c
> >file and build that instead.  You only have to do this for one of the
> >drivers, not both, and you should be fine.
> 
> Would a symbolic link also be a "cheat" here?

That would work, but I don't want to be the first one to create a link
in the kernel source tree, sorry.

thanks,

greg k-h
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux