Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved]portage, bashrc i gcc
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Polskie forum (Polish)
View previous topic :: View next topic  
Author Message
nenros
n00b
n00b


Joined: 26 Aug 2007
Posts: 11

PostPosted: Sun Jul 03, 2011 4:43 pm    Post subject: [solved]portage, bashrc i gcc Reply with quote

Jak może widać kilka postów niżej bawiłem się clangiem i chromem i chciałbym kontynuować parę eksperymentów, jednakże jednak jestem noobkiem w tej kwestii i dalej mam parę pytań. Próbuję zrobić tak, aby tylko wybrane kompilował za pomocą gcc. Znalazłem rozwiązanie z icc http://en.gentoo-wiki.com/wiki/Intel_C++_Compiler i próbowałem to trochę zmodyfikować i doszedłem że starczy takie coś:
Code:

if [ -r ${ROOT}/etc/portage/package.gcc ] || return 0
while read -a target; do
  if [ "${target}" = "${CATEGORY}/${PN}" ]; then
    export CC="/usr/bin/gcc"
    export CXX="/usr/bin/g++"
    break
  fi
done < ${ROOT}/etc/portage/package.gcc
fi

aczkolwiek to nie działa, ktoś podpowie jak to rozwiązać?

edit:
Dobra problem solved, nie ustawiam zmiennej w make.conf, tylko w samym bashrc

Code:

 [ -r ${ROOT}/etc/portage/package.gcc ] || return 0
while read -a target; do
  if [ "${target}" = "${CATEGORY}/${PN}" ]; then
    export CC="/usr/bin/gcc"
    export CXX="/usr/bin/g++"
  else
    export CC="/usr/bin/clang"
    export CXX="/usr/bin/clang++"
  fi
done < ${ROOT}/etc/portage/package.gcc
Back to top
View user's profile Send private message
Jacekalex
Guru
Guru


Joined: 17 Sep 2009
Posts: 553

PostPosted: Tue Jul 10, 2012 5:28 am    Post subject: Reply with quote

Łap sznurka:
http://wiki.gentoo.org/wiki/Clang
Da się tym sposobem majstrować przy kompilatorach we wszystkich kierunkach ;)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Polskie forum (Polish) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum