[lkml]   [2000]   [Sep]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    SubjectRe: We interrupt you regularly scheduled catfight for.. Linux 2.2.18pre13
    > o	Fix the 'which' compiler stuff			(Horst von Brand,
    > Peter Samuelson)
    > | Can someone verify for me this works on Slackware and
    > | on Caldera ?

    It breaks on Caldera.
    The errors are:

    ------ snip -----
    bin/sh: syntax error near unexpected token `(/'
    /bin/sh: -c: line 1: `if which: no gcc272 in (/bin:/usr/bin:/usr/sbin:/sbin:/home/lstguest/hch/bin)
    which: no kgcc in (/bin:/usr/bin:/usr/sbin:/sbin:/home/lstguest/hch/bin) cc -D__KERNEL__
    -I/home.stand/lstguest/hch/linux/include -fno-strict-aliasing -S -o /dev/null -xc /dev/null >/dev/null
    2>&1; then echo "-fno-strict-aliasing"; fi'
    (/bin:/usr/bin:/usr/sbin:/sbin:/home/lstguest/hch/bin) cc -D__KERNEL__
    -I/home.stand/lstguest/hch/linux/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -D__SMP__
    -pipe -fno-strength-reduce -m486 -malign-loops=2 -malign-jumps=2 -malign-functions=2 -DCPU=686 -v 2>&1
    ------ snip -----

    The problem is that the which output is not ignored.
    The following patch fixes it:

    ----- snip -----

    --- Makefile~ Sun Oct 1 00:46:27 2000
    +++ Makefile Sun Oct 1 00:49:27 2000
    @@ -23,7 +23,7 @@
    CC =$(shell if [ -n "$(CROSS_COMPILE)" ]; then echo $(CROSS_COMPILE)cc; else \
    - which gcc272 2>/dev/null || which kgcc 2>/dev/null || echo cc; fi) \
    + which gcc272 >/dev/null 2>/dev/null || which kgcc > /dev/null 2>/dev/null || echo cc; fi) \
    -D__KERNEL__ -I$(HPATH)
    CPP =$(CC) -E
    ----- snip -----
    I personally dislike the 'autmatically detect kgcc and gcc272' patches a lot,
    and I think we should put a sentence like

    If you are using a distribution that ships with a default C compiler that is
    not able to compile linux kernel, use make CC=kgcc (redhat) or CC=gcc272
    (debian) instead.

    into README, instead of fiddling around with a command/program with lots of
    different and incompatible versions.

    Always remember that you are unique. Just like everyone else.
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 12:39    [W:0.023 / U:24.020 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site