Package Base Details: linux-ck

Git Clone URL: https://aur.archlinux.org/linux-ck.git (read-only)
Submitter: graysky
Maintainer: graysky
Last Packager: graysky
Votes: 395
Popularity: 1.215586
First Submitted: 2011-07-22 14:51
Last Updated: 2019-02-16 18:54

Packages (2)

t3ddy commented on 2011-08-29 11:55

I think I'm the only mad that uses i686 with SandyBridge :)

Det commented on 2011-08-29 11:37

Great. Now we just need to either have a check for i686/Sandy Bridge systems or remove the whole "-march=native" altogether.

For starters I'd suggest something like this (the "AUR post inspector" removes the 2 spaces from the beginning of the make lines) (might not even work - did this in Windows):

if [ "$CARCH" = 'i686' ] && [`gcc -c -Q -march=native --help=target|grep march` = *corei7-avx]; then
make ${MAKEFLAGS} KCFLAGS="-march=prescott -pipe --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2" KCPPFLAGS="-march=prescott -pipe --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2" bzImage modules
else
make ${MAKEFLAGS} KCFLAGS="-march=native -pipe --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2" KCPPFLAGS="-march=native -pipe --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2" bzImage modules
fi

It's just that since there's so many of those CPU generations needing a different "-march" with 32-bit OSes it'd be quite a list to include them all. Having multiple 'linux-ck' packages is not for my liking either.

Det commented on 2011-08-29 11:35

Great. Now we just need to either have a check for i686/Sandy Bridge systems or remove the whole "-march=native" altogether.

For starters I'd suggest something like (the "AUR post inspector" removes the 2 spaces from the beginning of the make lines):

if [ "$CARCH" = 'i686' ] && [`gcc -c -Q -march=native --help=target|grep march` = *corei7-avx]; then
make ${MAKEFLAGS} KCFLAGS="-march=prescott -pipe --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2" KCPPFLAGS="-march=native -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2" bzImage modules
else
make ${MAKEFLAGS} KCFLAGS="-march=native -pipe --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2" KCPPFLAGS="-march=native -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2" bzImage modules
fi

It's just that since there's so many of those CPU generations needing a different "-march" with 32-bit OSes it'd be quite a list to include them all. Having multiple 'linux-ck' packages is not for my liking either.

t3ddy commented on 2011-08-29 11:03

@Det
You got it. Using "-march=prescott" in KC(PP)FLAGS works.

Det commented on 2011-08-29 09:52

@t3ddy, heh-heh, I'm not expecting you to prove me anything. I _know_ "-march=prescott" is the one you should be using. That's the whole point.

The thing is that since:
1) makepkg.conf is not used in any way (even built this kernel with "-march=corei7-avx" just to be sure (I got an AMD CPU)) &&
2) "-march=native" corresponds to "-march=corei7-avx" in your system; then
you _need_ to try with "-march=prescott" in the KC(PP)FLAGS.

Also if you don't like the long compilation times you should set up ccache. It eliminates the need of rebuilding the same stuff.

Det commented on 2011-08-29 09:49

@t3ddy, heh-heh, I'm not expecting you to prove me anything. I _know_ "-march=prescott" is the one you should be using. That's the whole point.

The thing is that since:
1) makepkg.conf is not used in any way (even built this kernel with "-march=corei7-avx" just to be sure (I got an AMD CPU)) &&
2) "-march=native" corresponds to "-march=corei7-avx" in your system; then
you _need_ to try with "-march=prescott" in the KC(PP)FLAGS.

Also if you don't like the long compliation times you should set up ccache. It eliminates the need of rebuilding the same stuff.

t3ddy commented on 2011-08-29 08:15

@graysky
I've changed makepkg.conf as you said, but KC(PP)FLAGS are still a problem: with them the pc reboot continuously, without everything is fine.

@Det
I'll try also KC(PP)FLAGS with "prescott", but I'm going mad now making all this proofs :/

Det commented on 2011-08-29 05:37

If you are supposed to use "-march=prescott" on a 32-bit with Sandy Bridge (because "-march=corei7-avx" is for 64-bit) how could _that_ suddenly be the wrong thing? Isn't that what you're using with your pre-compiled Sandy Bridge i686 version too?

And really, yesterday I built my kernel with "-march=corei7-avx" in my makepkg.conf and the size was still the same.

t3ddy should just test with "-march=prescott" as the KC(PP)FLAGS and report back.

graysky commented on 2011-08-28 22:24

@Det and t3ddy - A related post to your situation t3ddy: https://bbs.archlinux.org/viewtopic.php?id=125295

graysky commented on 2011-08-28 22:19

@t3ddy - There's yer problem! That -march=prescott is f*cking it up. Note in your output the following: -march= corei7-avx

Change your /etc/makepkg.conf CFLAGS to read the following and you can customize till your heart is content.

CFLAGS="-march=native -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2"
CXXFLAGS="${CFLAGS}"

@Det - it would seem that the FLAGS in /etc/makepkg.conf are used in a detrimental way.