Slackware This Forum is for the discussion of Slackware Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
|
06-04-2013, 04:48 AM
|
#1
|
Member
Registered: Sep 2012
Location: Bulgaria,Varna
Distribution: Slackware64
Posts: 249
Rep:
|
Slackware64 current gcc-4.8.1 and glibc-2.17
Hello Slackware users
I compile gcc-4.8.1 and rebuild my entire system from scratch.Yes i know i use minimal system installation but all packages build perfectly.
This is the steps and packages that i rebuild from source using new gcc-4.8.1
First i recompile all the packages/dependencies needed to rebuild my entire system.
First i recompile all packages/dependencies with gcc-4.8.0
The dependencie packages needed to rebuild my entire system
This is the build order
Code:
patch
groff
texinfo
libtermcap
m4
autoconf
automake
pkg-config
bison
flex
libtiff
curl
libarchive
cpio
expat
tcl
libjpeg
yasm
python
mozilla-nss
libxslt
gettext
gettext-tools
util-macros
xorg-sgml-doctools
glproto
inputproto
kbproto
libpthread-stubs
randrproto
recordproto
renderproto
xextproto
xproto
libXpm
libXaW
cmake
openssl
libtool
intltool
gobject-introspection
nettle
p11-kit
pcre
xcursorgen
xbitmaps
bigreqsproto
compositeproto
damageproto
dri2proto
evieext
fixesproto
fonstproto
fontcacheproto
printproto
resourceproto
scrnsaverproto
videoproto
xcb-proto
xcmiscproto
xf86dgaproto
xf86driproto
xf86miscproto
xf86vidmodeproto
xineramaproto
libXtst
xtrans
makedepend
xorg-server-xvfb
slang
at-spi2-core
at-spi2-atk
gtk3
cups
openldap-client
acl
llvm
doxygen
gperf
iso-codes
sysfsutils
vim
vim-gvim
libusb
usbutils
db48
popt
rpm
rpm2tgz
slacktrack
linuxdoc-tools
git
Second step is compiling toolchain
Build order are
Code:
binutils
kernel-headers
gcc-4.8.0_static
glibc
gcc
ncurses
bash
bzip2
coreutils
diffutils
perl
file
findutils
gawk
grep
gzip
make
sed
tar - #add sed -i -e '/gets is a/d' gnu/stdio.in.h to Slackbuild to compile tar against new glibc-2.17
xz
Third step is to recompile again all the dependencies with new gcc-4.8.1
Four step is to recompile system packages
Build order are
Code:
aaa_base
aaa_elflibs
alsa-lib
alsa-oss
alsa-utils
atk
attr
audiofile
bin
bc
cairo
cdrtools
cxxlibs
cyrus-sasl
dbus
dbus-glib
devs
dhcpcd
dialog
e2fsprogs
eject
etc
exiv2
flac
fribidi
freetype
harfbuzz
icu4c
gdk-pixbuf2
pango
geeqie
giflib
glib2
gnupg
gtk+2
gvfs
htop
infozip
iputils
kernel-firmware
kmod
lcms
lcms2
libatasmart
libcdio
libcroco
libffi
libgcrypt
libmad
libmcs
libmng
libmowgli
libmpc
libnotify
libogg
libpng
libtheora
libvorbis
libwnck
libxklavier
libxml2
lilo
links
lzo
mpg123
nano
#net-tools #Missing kernel header file ip_h
network-scripts
openssl
phonon
pkgtools
polkit
poppler
procps
sdl
shadow
shared-mime-info
#slackpkg # No source available
slocate
startup-notification
sysklogd
sysvinit
sysvinit-scripts
udev # To compile udev with new glibc-2.17 i need to add -lrt CFLAG
udisks2
unrar
util-linux
vte
wget
which
zlib
kernel
kernel-modules
Five step is to compile X
Build order are
Code:
fontconfig
freeglut
glew
libdrm
mtdev
mesa
glu
x11-skel
fontconfig-infinality
xorg-server packages - I use minimal instalation and this is the packages from X
iceauth
setxkbmap
xauth
xinit
xkbutils
xkeyboard-config
xf86-input-evdev
xf86-video-ati
libfontenc
libICE
libSM
libX11
libXau
libxcb
libXcomposite
libXcursor
libXdamage
libXdmcp
libXext
libXfixes
libXfont
libXft
libXi
libXinerama
libxkbfile
libXmu
libXrandr
libXrender
libXres
libXScrnSaver
libXt
libXv
libXxf86dga
libXxf86vm
pixman
libxcb
xcb-util
xorg-server
Six step is to recompile xfce4
This is the build order
Code:
libxfce4util
xfconf
libxfce4ui
garcon
exo
xfce4-panel
Thunar
xfce4-settings
xfce4-session
xfwm4
xfdesktop
xfce4-appfinder
gtk-xfce-engine
xfce4-terminal
tumbler
xfce4-notifyd
xfwm4-themes
Seven step is to recompile "other" packages
Code:
ConsoleKit
libvdpau
MPlayer
audacious
audacious-plugins
epdfview
flash-player-plugin
leafpad
libevent
libsoup
murrine
murrine-themes
p7zip
transmission
xarchiver
xfce4-screenshooter
ttf-bitstream-vera
dejavu
skype_static
mozilla-firefox
And thats it.
Oh and i forget all packages are build with
Code:
-O2 -fPIC -march=native -mtune=native
Last edited by tuxbg; 06-04-2013 at 05:28 AM.
Reason: CFLAGS :)
|
|
|
06-05-2013, 01:26 AM
|
#2
|
Member
Registered: Feb 2003
Location: Almere, Netherlands
Distribution: slack 7.1 till latest and -current, LFS
Posts: 368
Rep:
|
Hiya Tuxbg,
This might be nice for blog post.
|
|
|
06-05-2013, 06:54 AM
|
#3
|
Member
Registered: Sep 2012
Location: Bulgaria,Varna
Distribution: Slackware64
Posts: 249
Original Poster
Rep:
|
Oh i forget one more thing
I rebuild gcc with cloog and isl support
This is the SlackBuild that i create to rebuild gcc
Code:
#!/bin/bash
#Имена на пакетите
GMP_VERS=5.1.2
GMP_BUILD=${GMP_BUILD:-1}
MPFR_VERS=3.1.2
MPFR_BUILD=${MPFR_BUILD:-1}
MPC_VERS=0.8.2
MPC_BUILD=${MPC_BUILD:-2}
PPL_VERS=1.0
PPL_BUILD=${PPL_BUILD:-1}
ISL_VERS=0.11.1
ISL_BUILD=${ISL_BUILD:-1}
CLOOG_VERS=0.18.0
CLOOG_BUILD=${CLOOG_BUILD:-1}
GCC_VERS=4.8.1
GCC_BUILD=${GCC_BUILD:-1}
#Архитектура на хоста
export ARCH=x86_64
#Паралелни задачи
NUMJOBS=${NUMJOBS:-" -j7 "}
#Работни директории
CWD=$(pwd)
TMP=${TMP:-/tmp/}
PKG1=$TMP/package-gmp
PKG2=$TMP/package-mpfr
PKG3=$TMP/package-mpc
PKG4=$TMP/package-ppl
PKG5=$TMP/package-isl
PKG6=$TMP/package-cloog
PKG7=$TMP/package-gcc
PKG8=$TMP/package-gcc-g++
#Всеки пакет има отделна директория за билдване
mkdir -p $TMP/build/{gmp,mpfr,mpc,ppl,isl,cloog,gcc}
#CPP/CXX флагове
if [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC -march=native -mtune=native -flto -fuse-linker-plugin"
LIBDIRSUFFIX="64"
else
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
fi
rm -rf $PKG1
mkdir -p $TMP $PKG1/usr
cd $TMP
tar xvf $CWD/gmp-$GMP_VERS.tar.?z*
cd gmp-$GMP_VERS
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
-exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
# End of preparations
if echo "$*" | grep -qw -- --prep ; then
exit 0
fi
cd $TMP/build/gmp
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="-O2 -fPIC -march=native -mtune=native -flto -fuse-linker-plugin -fexceptions" \
../../gmp-$GMP_VERS/configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--infodir=/usr/info \
--with-gnu-ld \
--enable-cxx \
--build=x86_64-slackware-linux
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG1 || exit 1
rm $PKG1/usr/info/dir
gzip -9 $PKG1/usr/info/*
find $PKG1 | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
mkdir -p $PKG1/usr/doc/gmp-$GMP_VERS
cp -a \
AUTHORS COPYING* NEWS README \
$PKG1/usr/doc/gmp-$GMP_VERS
# If there's a ChangeLog, installing at least part of the recent history
# is useful, but don't let it get totally out of control:
if [ -r ChangeLog ]; then
DOCSDIR=$(echo $PKG1/usr/doc/*-$GMP_VERS)
cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
touch -r ChangeLog $DOCSDIR/ChangeLog
fi
mkdir -p $PKG1/install
cat $CWD/slack-desc/slack-desc-gmp > $PKG1/install/slack-desc || exit 1
cd $PKG1
/sbin/makepkg -l y -c n $TMP/gmp-$GMP_VERS-$ARCH-$GMP_BUILD.txz || exit 1
upgradepkg --reinstall $TMP/gmp-$GMP_VERS-$ARCH-$GMP_BUILD.txz
cd $TMP
tar xvf $CWD/mpfr-$MPFR_VERS.tar.?z*
cd mpfr-$MPFR_VERS
chown -R root:root .
cd $TMP/build/mpfr
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
../../mpfr-$MPFR_VERS/configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--infodir=/usr/info \
--docdir=/usr/doc/mpfr-$MPFR_VERS \
--enable-static=yes \
--with-gmp=$PKG1 \
--enable-shared=yes \
--build=x86_64-slackware-linux
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG2 || exit 1
find $PKG2 | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
rm -f $PKG2/usr/info/dir
gzip -9 $PKG2/usr/info/*
mkdir -p $PKG2/usr/doc/mpfr-$MPFR_VERS
cp -a \
AUTHORS BUGS COPYING* FAQ.html INSTALL NEWS README* TODO VERSION \
examples \
$PKG2/usr/doc/mpfr-$MPFR_VERS
if [ -r ChangeLog ]; then
DOCSDIR=$(echo $PKG2/usr/doc/mpfr-$MPFR_VERS)
cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
touch -r ChangeLog $DOCSDIR/ChangeLog
fi
mkdir -p $PKG2/install
cat $CWD/slack-desc/slack-desc-mpfr > $PKG2/install/slack-desc
cd $PKG2
/sbin/makepkg -l y -c n $TMP/mpfr-$MPFR_VERS-$ARCH-$MPFR_BUILD.txz || exit 1
upgradepkg --reinstall $TMP/mpfr-$MPFR_VERS-$ARCH-$MPFR_BUILD.txz
cd $TMP
tar xvf $CWD/mpc-$MPC_VERS.tar.?z*
cd mpc-$MPC_VERS
chown -R root:root .
cd $TMP/build/mpc
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
../../mpc-$MPC_VERS/configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--infodir=/usr/info \
--docdir=/usr/doc/mpc-$MPC_VERS \
--with-gmp=$PKG1 \
--with-mpfr=$PKG2 \
--enable-static=yes \
--enable-shared=yes \
--build=x86_64-slackware-linux
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG3 || exit 1
find $PKG3 | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
rm -f $PKG3/usr/info/dir
gzip -9 $PKG3/usr/info/*
mkdir -p $PKG3/usr/doc/mpc-$MPC_VERS
cp -a \
AUTHORS COPYING* INSTALL NEWS README* TODO \
$PKG3/usr/doc/mpc-$MPC_VERS
if [ -r ChangeLog ]; then
DOCSDIR=$(echo $PKG3/usr/doc/mpc-$MPC_VERS)
cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
touch -r ChangeLog $DOCSDIR/ChangeLog
fi
mkdir -p $PKG3/install
cat $CWD/slack-desc/slack-desc-mpc > $PKG3/install/slack-desc || exit 1
cd $PKG3
/sbin/makepkg -l y -c n $TMP/mpc-$MPC_VERS-$ARCH-$MPC_BUILD.txz || exit 1
upgradepkg --reinstall --install-new $TMP/mpc-$MPC_VERS-$ARCH-$MPC_BUILD.txz
cd $TMP
tar xvf $CWD/ppl-$PPL_VERS.tar.?z*
cd ppl-$PPL_VERS
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
-exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
cd $TMP/build/ppl
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
../../ppl-$PPL_VERS/configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--mandir=/usr/man \
--with-gmp=$PKG1
--enable-interfaces="c,cxx" \
--build=x86_64-slackware-linux
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG4
find $PKG4 | xargs file | grep -e "executable" -e "shared object" \
| grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
if [ -d $PKG4/usr/man ]; then
( cd $PKG4/usr/man
for manpagedir in $(find . -type d -name "man*") ; do
( cd $manpagedir
for eachpage in $( find . -type l -maxdepth 1) ; do
ln -s $( readlink $eachpage ).gz $eachpage.gz
rm $eachpage
done
gzip -9 *.?
)
done
)
fi
mkdir -p $PKG4/install
cat $CWD/slack-desc/slack-desc-ppl > $PKG4/install/slack-desc || exit 1
cd $PKG4
/sbin/makepkg -l y -c n $TMP/ppl-$PPL_VERS-$ARCH-$PPL_BUILD.txz || exit 1
upgradepkg --reinstall --install-new $TMP/ppl-$PPL_VERS-$ARCH-$PPL_BUILD.txz
cd $TMP
tar xvf $CWD/isl-$ISL_VERS.tar.?z*
cd isl-$ISL_VERS
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
-exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
../../isl-$ISL_VERS/configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--mandir=/usr/man \
--sysconfdir=/etc \
--build=x86_64-slackware-linux
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG5
rm -f $PKG5/usr/lib${LIBDIRSUFFIX}/*gdb.py
find $PKG5 | xargs file | grep -e "executable" -e "shared object" \
| grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
if [ -d $PKG5/usr/man ]; then
( cd $PKG5/usr/man
for manpagedir in $(find . -type d -name "man*") ; do
( cd $manpagedir
for eachpage in $( find . -type l -maxdepth 1) ; do
ln -s $( readlink $eachpage ).gz $eachpage.gz
rm $eachpage
done
gzip -9 *.?
)
done
)
fi
mkdir -p $PKG5/install
cat $CWD/slack-desc/slack-desc-ppl > $PKG5/install/slack-desc || exit 1
cd $PKG5
/sbin/makepkg -l y -c n $TMP/isl-$ISL_VERS-$ARCH-$ISL_BUILD.txz || exit 1
upgradepkg --reinstall --install-new $TMP/isl-$ISL_VERS-$ARCH-$ISL_BUILD.txz
cd $TMP
tar xvf $CWD/cloog-$CLOOG_VERS.tar.?z*
cd cloog-$CLOOG_VERS
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
-exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
cd $TMP/build/cloog
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
../../cloog-$CLOOG_VERS/configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--mandir=/usr/man \
--sysconfdir=/etc \
--with-gmp=$PKG1 \
--with-isl=system \
--with-bits=gmp \
--build=x86_64-slackware-linux
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG6
find $PKG6 | xargs file | grep -e "executable" -e "shared object" \
| grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
if [ -d $PKG6/usr/man ]; then
( cd $PKG6/usr/man
for manpagedir in $(find . -type d -name "man*") ; do
( cd $manpagedir
for eachpage in $( find . -type l -maxdepth 1) ; do
ln -s $( readlink $eachpage ).gz $eachpage.gz
rm $eachpage
done
gzip -9 *.?
)
done
)
fi
mkdir -p $PKG6/install
cat $CWD/slack-desc/slack-desc-cloog > $PKG6/install/slack-desc || exit 1
cd $PKG6
/sbin/makepkg -l y -c n $TMP/cloog-$CLOOG_VERS-$ARCH-$CLOOG_BUILD.txz || exit 1
upgradepkg --reinstall --install-new $TMP/cloog-$CLOOG_VERS-$ARCH-$CLOOG_BUILD.txz
mkdir -p $PKG{7,8}/install
cat $CWD/slack-desc/slack-desc-gcc > $PKG7/install/slack-desc
cat $CWD/slack-desc/slack-desc-gcc-g++ > $PKG8/install/slack-desc
cd $TMP
tar xvf $CWD/gcc-$GCC_VERS.tar.?z*
( cd $TMP/gcc-$GCC_VERS
#NO fixincludes
sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in
sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" {libiberty,gcc}/configure
chown -R root:root .
find . -perm 777 -exec chmod 755 {} \;
find . -perm 775 -exec chmod 755 {} \;
find . -perm 754 -exec chmod 755 {} \;
find . -perm 664 -exec chmod 644 {} \;
)
cd $TMP/build/gcc
CFLAGS="-O2 -fPIC -march=native -mtune=native" \
CXXFLAGS="-O2 -fPIC -march=native -mtune=native" \
../../gcc-$GCC_VERS/configure --prefix=/usr \
--libdir=/usr/lib$LIBDIRSUFFIX \
--mandir=/usr/man --infodir=/usr/info \
--enable-bootstrap \
--enable-languages=c,c++,lto \
--enable-shared --enable-threads=posix \
--with-system-zlib --enable-__cxa_atexit \
--disable-libunwind-exceptions --enable-clocale=gnu \
--disable-libstdcxx-pch --disable-nls \
--enable-gnu-unique-object --enable-linker-build-id \
--enable-lto --enable-gold --enable-ld=default \
--enable-cloog-backend=isl --disable-cloog-version-check \
--with-gmp=/usr --with-mpfr=/usr --with-mpc=/usr \
--with-ppl=/usr --with-cloog=/usr \
--enable-plugin --with-plugin-ld=ld.gold \
--with-linker-hash-style=gnu --disable-gtktest \
--disable-multilib --disable-libssp --disable-werror \
--enable-checking=release \
--with-cpu=native --with-arch=native --with-tune=native \
--with-arch-directory=amd64 \
--target=x86_64-slackware-linux \
--build=x86_64-slackware-linux \
--host=x86_64-slackware-linux || exit 1
make $NUMJOBS bootstrap ;
make info
make $NUMJOBS check
make install DESTDIR=$PKG7
rm -f $PKG7/usr/lib${LIBDIRSUFFIX}/*gdb.py
if [ ! -r $PKG7/usr/lib${LIBDIRSUFFIX}/gcc/x86_64-slackware-linux/${GCC_VERS}/specs ]; then
cat stage1-gcc/specs > $PKG7/usr/lib${LIBDIRSUFFIX}/gcc/x86_64-slackware-linux/${GCC_VERS}/specs
fi
if [ "$ARCH" = "x86_64" ]; then
sed -i 's#;.\(:../lib !m64 m32;\)$#;32\1#' \
$PKG7/usr/lib${LIBDIRSUFFIX}/gcc/x86_64-slackware-linux/${GCC_VERS}/specs
fi
make -i install-info DESTDIR=$PKG7
chmod 755 $PKG7/usr/lib${LIBDIRSUFFIX}/libgcc_s.so.1
( cd $PKG7/usr/info ; rm dir ; gzip -9 * )
( cd $PKG7
mkdir -p lib
cd lib
ln -sf $PKG7/usr/bin/cpp .
)
( cd $PKG7/usr/bin
mv g++ g++-gcc-$GCC_VERS
mv gcc gcc-$GCC_VERS
ln -sf g++-gcc-$GCC_VERS g++
ln -sf gcc-$GCC_VERS gcc
ln -sf g++ c++
ln -sf gcc cc
ln -sf gcc-$GCC_VERS x86_64-slackware-linux-gcc
ln -sf gcc-$GCC_VERS x86_64-slackware-linux-gcc-$GCC_VERS
ln -sf gcc-ar x86_64-slackware-linux-gcc-ar
ln -sf gcc-nm x86_64-slackware-linux-gcc-nm
ln -sf gcc-ranlib x86_64-slackware-linux-gcc-ranlib
ln -sf g++-gcc-$GCC_VERS x86_64-slackware-linux-c++
ln -sf g++-gcc-$GCC_VERS x86_64-slackware-linux-g++
)
( cd $PKG7/usr/man
gzip -9 */*
cd man1
ln -sf g++.1.gz c++.1.gz
ln -sf gcc.1.gz cc.1.gz
)
# gcc-g++:
( cd $PKG8
mkdir -p usr/bin
mv $PKG7/usr/bin/*++* usr/bin
mkdir -p usr/include
mv $PKG7/usr/include/c++ usr/include
mkdir -p usr/lib${LIBDIRSUFFIX}
mv $PKG7/usr/lib${LIBDIRSUFFIX}/*++* usr/lib${LIBDIRSUFFIX}
mkdir -p usr/libexec/gcc/x86_64-slackware-linux/$GCC_VERS
mv $PKG7/usr/libexec/gcc/x86_64-slackware-linux/$GCC_VERS/cc1plus usr/libexec/gcc/x86_64-slackware-linux/$GCC_VERS/cc1plus
mkdir -p usr/man/man1
mv $PKG7/usr/man/man1/*++* usr/man/man1
) || exit 1
( cd $TMP
for file in $(find . -type f -name "*.la") ; do
cat $file | sed -e 's%-L/gcc-[[:graph:]]* % %g' > $TMP/tmp-la-file
cat $TMP/tmp-la-file > $file
done
rm $TMP/tmp-la-file
)
for dir in $PKG{7,8}; do
( cd $dir
find . -name "lib*so*" -exec strip --strip-unneeded "{}" \;
find . -name "lib*a" -exec strip -g "{}" \;
strip --strip-unneeded usr/bin/* 2> /dev/null
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
)
done
( cd $PKG7
makepkg -l y -c n $TMP/gcc-$GCC_VERS-$ARCH-$GCC_BUILD.txz )
( cd $PKG8
makepkg -l y -c n $TMP/gcc-g++-$GCC_VERS-$ARCH-$GCC_BUILD.txz )
cd $TMP
rm -rf build
rm -rf $PKG{1,2,3,4,5,6,7}
#Махаме сорс кода
rm -rf gmp-GMP_VERS
rm -rf mpfr-$MPFR_VERS
rm -rf mpc-$MPC_VERS
rm -rf ppl-$PPL_VERS
rm -rf isl-$ISL_VERS
rm -rf cloog-$CLOOG_VERS
rm -rf gcc-$GCC_VERS
rm -rf package-gcc-g++
echo
echo "Slackware GCC package build complete!"
echo
Last edited by tuxbg; 06-05-2013 at 06:57 AM.
|
|
1 members found this post helpful.
|
06-05-2013, 11:34 AM
|
#4
|
Member
Registered: Sep 2012
Location: Bulgaria,Varna
Distribution: Slackware64
Posts: 249
Original Poster
Rep:
|
With this net-tools now compiles perfect
This is updated SlackBuild script.I made some modifications to it
Code:
#!/bin/sh
# Copyright 2006, 2007, 2008, 2009, 2010, 2012 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PKGNAM=net-tools
VERSION=${VERSION:-CVS_20101030}
BUILD=${BUILD:-1}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) export ARCH=i486 ;;
arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) export ARCH=$( uname -m ) ;;
esac
fi
CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-${PKGNAM}
rm -rf $PKG
mkdir -p $TMP $PKG
if [ "$ARCH" = "i386" ]; then
SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
elif [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
else
SLKCFLAGS="-O2"
fi
cd $TMP
rm -rf net-tools-$VERSION
tar xvf $CWD/net-tools-$VERSION.tar.gz || exit 1
cd net-tools-$VERSION || exit 1
sed -i -e '/Token/s/y$/n/' config.in
sed -i -e '/HAVE_HWSTRIP/s/y$/n/' config.in
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
-exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
mkdir -p $PKG/usr/doc/net-tools-$VERSION
cp -a COPYING* README* $PKG/usr/doc/net-tools-$VERSION
chmod 644 $PKG/usr/doc/net-tools-$VERSION/*
chown root:root $PKG/usr/doc/net-tools-$VERSION/*
yes "" | make config
make
make update DESTDIR=$PKG
strip --strip-unneeded ipmaddr iptunnel hostname arp ifconfig nameif rarp route netstat plipconfig slattach mii-tool
mkdir -p $PKG/sbin $PKG/bin $PKG/usr/sbin
cat arp > $PKG/sbin/arp
cat ifconfig > $PKG/sbin/ifconfig
cat rarp > $PKG/sbin/rarp
cat route > $PKG/sbin/route
cat hostname > $PKG/bin/hostname
cat mii-tool > $PKG/sbin/mii-tool
cat nameif > $PKG/sbin/nameif
cat netstat > $PKG/bin/netstat
cat plipconfig > $PKG/sbin/plipconfig
cat slattach > $PKG/usr/sbin/slattach
cat ipmaddr > $PKG/sbin/ipmaddr
cat iptunnel > $PKG/sbin/iptunnel
chmod 755 $PKG/sbin/* $PKG/bin/* $PKG/usr/sbin/*
cd man/en_US
mkdir -p $PKG/usr/man/man{1,5,8}
for page in dnsdomainname.1 domainname.1 hostname.1 nisdomainname.1 \
ypdomainname.1 ; do
cat $page | gzip -9c > $PKG/usr/man/man1/$page.gz
done
cat ethers.5 | gzip -9c > $PKG/usr/man/man5/ethers.5.gz
for page in arp.8 ifconfig.8 mii-tool.8 nameif.8 netstat.8 rarp.8 route.8 \
slattach.8 plipconfig.8 ; do
cat $page | gzip -9c > $PKG/usr/man/man8/$page.gz
done
( cd $PKG/bin
ln -sf hostname dnsdomainname
ln -sf hostname nisdomainname
ln -sf hostname ypdomainname
)
# This is a little Slackware-specific tool used in some of the network
# related scripts to calculate network and broadcast addresses:
( cd $PKG/bin
cc -O2 -o ipmask $CWD/ipmask.c
strip --strip-unneeded ipmask
chmod 755 ipmask
)
cat $CWD/ipmask.8 | gzip -9c > $PKG/usr/man/man8/ipmask.8.gz
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
makepkg -l y -c n $TMP/${PKGNAM}-$VERSION-$ARCH-$BUILD.txz
|
|
|
06-05-2013, 01:21 PM
|
#5
|
Member
Registered: Feb 2003
Location: Almere, Netherlands
Distribution: slack 7.1 till latest and -current, LFS
Posts: 368
Rep:
|
tux, in your gcc script, you hardcoded x86_64 only
why not both arches ?
|
|
|
06-05-2013, 02:39 PM
|
#6
|
Member
Registered: Sep 2012
Location: Bulgaria,Varna
Distribution: Slackware64
Posts: 249
Original Poster
Rep:
|
Quote:
Originally Posted by bartgymnast
tux, in your gcc script, you hardcoded x86_64 only
why not both arches ?
|
Well i don't think that anybody want to try this.
My host is x86_64 it's not so hard to edit this script and reconfigure it to i686.
I also have create a build script for all dependencies,"system stuff",all toolchain packages,"other stuff" ,etc
|
|
|
06-05-2013, 03:59 PM
|
#7
|
Senior Member
Registered: May 2008
Location: Romania
Distribution: DARKSTAR Linux 2008.1
Posts: 2,727
|
Congratulation, my Bulgarian friend!
And, because, of its development model, Slackware is considered as "not easy rebuild-able from sources", and even "un-rebuild-able from sources", I suggest you to continue to develop your work and this thread is what I call "it should be sticky"!
Why? Because if we manage to have a sources tree where with execution of an "slackware.Slackbuild" of even few scripts, we have opened a great window for experimentation, i.e. "which one is better as ARCH? i486, i586 or i686?" and for even more stability for Slackware, i.e. a more simple way to resolve The Great LibPNG Problem.
Also, porting the slackware to an new ARM platform will become more easy, when we known "how to build Slackware, step-by-step".
Last edited by Darth Vader; 06-05-2013 at 04:03 PM.
|
|
3 members found this post helpful.
|
06-06-2013, 03:15 AM
|
#8
|
Member
Registered: Sep 2012
Location: Bulgaria,Varna
Distribution: Slackware64
Posts: 249
Original Poster
Rep:
|
Quote:
Originally Posted by Darth Vader
Congratulation, my Bulgarian friend!
And, because, of its development model, Slackware is considered as "not easy rebuild-able from sources", and even "un-rebuild-able from sources", I suggest you to continue to develop your work and this thread is what I call "it should be sticky"!
Why? Because if we manage to have a sources tree where with execution of an "slackware.Slackbuild" of even few scripts, we have opened a great window for experimentation, i.e. "which one is better as ARCH? i486, i586 or i686?" and for even more stability for Slackware, i.e. a more simple way to resolve The Great LibPNG Problem.
Also, porting the slackware to an new ARM platform will become more easy, when we known "how to build Slackware, step-by-step".
|
Thank you for your support neighbour
Well the hardest part of that build was the build order for the packages.Especially for dependiencies
|
|
|
06-06-2013, 03:31 AM
|
#9
|
Member
Registered: Sep 2012
Location: Bulgaria,Varna
Distribution: Slackware64
Posts: 249
Original Poster
Rep:
|
Oh one more thing
libmad is compiled with -O -fPIC because of this -fforce-mem
poppler is build with --disable-poppler-qt4
Last edited by tuxbg; 06-06-2013 at 03:38 AM.
|
|
|
06-07-2013, 05:59 AM
|
#10
|
Member
Registered: Sep 2012
Location: Bulgaria,Varna
Distribution: Slackware64
Posts: 249
Original Poster
Rep:
|
This patch is needed to build Virtualbox with gcc-4.8 and gcc-4.8.1
Code:
Index: configure
===================================================================
--- a/configure (revision 45449)
+++ a/configure (revision 45450)
@@ -416,7 +416,7 @@
elif [ $cc_maj -lt 3 \
-o \( $cc_maj -eq 3 -a $cc_min -lt 2 \) \
-o \( $cc_maj -eq 4 -a $cc_min -lt 1 -a "$OS" != "darwin" \) \
- -o \( $cc_maj -eq 4 -a $cc_min -gt 7 \) \
+ -o \( $cc_maj -eq 4 -a $cc_min -gt 8 \) \
-o $cc_maj -gt 4 ]; then
log_failure "gcc version $cc_ver found, expected gcc 3.x with x>1 or gcc 4.x with 0<x<8"
fail really
Index: Config.kmk
===================================================================
--- a/Config.kmk (revision 45449)
+++ a/Config.kmk (revision 45450)
@@ -1503,7 +1503,7 @@
#
# Compiler optimization flags.
#
-VBOX_GCC_WARN ?= -Wall $(VBOX_GCC_Wextra) $(VBOX_GCC_Wno-missing-field-initializers) -Wno-unused -Wno-trigraphs $(VBOX_GCC_fdiagnostics-show-option)
+VBOX_GCC_WARN ?= -Wall $(VBOX_GCC_Wextra) $(VBOX_GCC_Wno-missing-field-initializers) -Wno-unused -Wno-trigraphs $(VBOX_GCC_fdiagnostics-show-option) $(VBOX_GCC_no-unused-parameter)
VBOX_GCC_WARN_PEDANTIC = -Wshadow $(VBOX_GCC_WARN) -Wno-long-long
ifdef VBOX_WITH_MASOCHISTIC_WARNINGS
VBOX_GCC_WARN_PEDANTIC += -Wunused-variable -Wunused-function -Wunused-label -Wunused-parameter
@@ -2285,6 +2285,12 @@
$(QUIET)$(APPEND) '$@' ' endif'
$(QUIET)$(APPEND) '$@' 'endif'
endif
+# Prevent warnings about unused parameters as of gcc-4.8 as this warning is now very verbose
+ $(QUIET)$(APPEND) '$@' 'ifneq ($$(VBOX_GCC_VERSION_CXX),)'
+ $(QUIET)$(APPEND) '$@' ' ifneq ($$(int-ge $$(VBOX_GCC_VERSION_CXX),40800),)'
+ $(QUIET)$(APPEND) '$@' ' VBOX_GCC_no-unused-parameter ?= -Wno-unused-parameter'
+ $(QUIET)$(APPEND) '$@' ' endif'
+ $(QUIET)$(APPEND) '$@' 'endif'
ifeq ($(KBUILD_TARGET),solaris)
$(QUIET)$(APPEND) '$@' 'VBOX_GCC_msave-args ?= $(call VBOX_GCC_CHECK_CXX,-msave-args,)'
# Detect the solaris assembler. It is used by the the 4.x gcc compilers,
|
|
|
06-10-2013, 06:44 AM
|
#11
|
Member
Registered: Sep 2012
Location: Bulgaria,Varna
Distribution: Slackware64
Posts: 249
Original Poster
Rep:
|
Здравей Йоане
Hello all.Now i use google-chrome.To make possible to download magnet links with transmission i need to patch xdg-open.
This is the patch that i used.
Code:
--- xdg-open 2012-02-18 14:22:48.058497027 +0200
+++ xdg-open 2012-02-18 14:24:04.326875223 +0200
@@ -440,6 +440,11 @@
exit_success
fi
fi
+ elif (echo "$1" | grep -q '^magnet:'); then
+ transmission-gtk "$1"
+ if [ $? -eq 0 ]; then
+ exit_success
+ fi
fi
IFS=":"
|
|
|
08-04-2013, 05:53 AM
|
#12
|
Member
Registered: Sep 2012
Location: Bulgaria,Varna
Distribution: Slackware64
Posts: 249
Original Poster
Rep:
|
New dependencies added.ITSTOOL is needed to build gnome-doc-utils.ITSTOOL must be build before linuxdoc-tools
Last edited by tuxbg; 08-04-2013 at 05:54 AM.
|
|
|
08-04-2013, 07:20 PM
|
#13
|
Member
Registered: Dec 2008
Distribution: slackware64 openbsd
Posts: 105
Rep:
|
Quote:
Originally Posted by tuxbg
New dependencies added.ITSTOOL is needed to build gnome-doc-utils.ITSTOOL must be build before linuxdoc-tools
|
I hope you keep updating this because I want to rebuild my system too.
|
|
|
08-10-2013, 10:05 AM
|
#14
|
Member
Registered: Sep 2012
Location: Bulgaria,Varna
Distribution: Slackware64
Posts: 249
Original Poster
Rep:
|
Hm ...New dep is rsync needed to build vim
|
|
|
08-11-2013, 03:02 AM
|
#15
|
Member
Registered: Sep 2012
Location: Bulgaria,Varna
Distribution: Slackware64
Posts: 249
Original Poster
Rep:
|
Ok now this is for Pat
This patch is needed to openssl to build with new perl-5.18 because the build fails in pod2man while trying to generate man pages from the pod files
This is the error
Code:
cms.pod around line 457: Expected text after =item, not a number
cms.pod around line 461: Expected text after =item, not a number
cms.pod around line 465: Expected text after =item, not a number
cms.pod around line 470: Expected text after =item, not a number
cms.pod around line 474: Expected text after =item, not a number
POD document had syntax errors at /usr/bin/pod2man line 71.
make: *** [install_docs] Error 1
And patch is on attachment
Last edited by tuxbg; 08-11-2013 at 03:07 AM.
|
|
|
All times are GMT -5. The time now is 10:42 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|