管理
landisk:/# apt-get install dpkg-dev binutils gcc g++ make libncurses5-dev
landisk:/# apt-get install gcc-3.4 g++-3.4
#include<stdio.h> #include<stdlib.h> main() { printf("Hello world !!\n"); }
landisk:~# gcc hello.c -o hello landisk:~# ./hello Hello world !!
#include <iostream> main() { std::cout << "Hello C++ world !!\n"; }
landisk:~# g++ hello.cpp -o hello_cpp landisk:~# ./hello_cpp Hello C++ world !!
landisk:~# apt-get install gcj libgcj5-dev
public class hello { public static void main(String[] argv) { System.out.println("Hello Java World !!"); } }
landisk:~# gcj hello.java -o hello_java --main=hello landisk:~# ./hello_java Hello Java World !!
/home/landisk/kernel/linux-2.6.11/ …… カーネルソース /home/landisk/kernel/build/ …… ビルドディレクトリ
landisk:~/kernel$ tar vxfz linux-2.6.11-kogiidena-v0.1.src.tgz
landisk:~/kernel$ mkdir build landisk:~/kernel$ cp linux-2.6.11/arch/sh/configs/julian_defconfig build/.config
CROSS_COMPILE ?= HOSTCC = gcc HOSTCXX = g++
landisk:~/kernel$ cd linux-2.6.11 landisk:~/kernel/linux-2.6.11$ make O=~/kernel/build menuconfig
landisk:~/kernel$ cd ~/kernel/build landisk:~/kernel/build$ make
landisk:~/kernel/build$ su # suでrootになって、 landisk:~/kernel/build$ make modules_install
# which patches should be applied? debian_patches = \ cvs-updates \ gcc-version \ gcc-textdomain \ rename-info-files \ libstdc++-pic \ libstdc++-doclink \ amd64-specs \ gccbug \ gccbug-posix \ hppa-toplevel hppa-libffi hppa-libjava hppa-libjava-update \ fastjar-update \ java-gui-branch \ boehm-gc-nocheck \ libltdl \ m68k-update \ gcc-3.4.1-PR16665 \ gcc-3.4.1-sh-no-reorder-blocks \ gcc-3.4.3-sh-GCfix \
with_common_pkgs := yes with_common_libs := yes with_ada := no with_check := no
$(binary_stamp)-gcc: $(install_dependencies) dh_testdir dh_testroot mv $(install_stamp) $(install_stamp)-tmp rm -rf $(d_gcc) dh_installdirs -p$(p_gcc) $(dirs_gcc) mv $(d)/$(PF)/$(libdir)/libgcc_s.so $(d)/$(gcc_lib_dir)/libgcc_s.so # rm -f $(d)/$(PF)/$(libdir)/libgcc_s.so # ln -sf /$(libdir)/libgcc_s.so.$(GCC_SONAME) $(d)/$(gcc_lib_dir)/libgcc_s.so
$(binary_stamp)-gcc: $(install_dependencies) dh_testdir dh_testroot mv $(install_stamp) $(install_stamp)-tmp rm -rf $(d_gcc) dh_installdirs -p$(p_gcc) $(dirs_gcc) mv $(d)/$(PF)/$(DEB_TARGET_GNU_TYPE)/$(libdir)/libgcc_s.so $(d)/$(gcc_lib_dir)/libgcc_s.so # rm -f $(d)/$(PF)/$(libdir)/libgcc_s.so # ln -sf /$(PF)/$(DEB_TARGET_GNU_TYPE)/$(libdir)/libgcc_s.so.$(GCC_SONAME) $(d)/$(gcc_lib_dir)/libgcc_s.so
landisk:/share/src2/gcc-3.4/gcc-3.4-3.4.3# dpkg-checkbuilddeps dpkg-checkbuilddeps: Unmet build dependencies: gnat-3.3 | gnat-3.4 g++-3.3 g77-3.3 gobjc-3.3 landisk:/share/src2/gcc-3.4/gcc-3.4-3.4.3# ddpkg-buildpackage -d
cpp-3.4-doc_3.4.3-13_all.deb libg2c0-dev_3.4.3-13_sh4.deb cpp-3.4_3.4.3-13_sh4.deb libg2c0_3.4.3-13_sh4.deb fastjar_3.4.3-13_sh4.deb libgcc1_3.4.3-13_sh4.deb fixincludes_3.4.3-13_sh4.deb libgcj-common_3.4.3-13_all.deb g++-3.4_3.4.3-13_sh4.deb libgcj5-awt_3.4.3-13_sh4.deb g77-3.4-doc_3.4.3-13_all.deb libgcj5-common_3.4.3-13_all.deb g77-3.4_3.4.3-13_sh4.deb libgcj5-dev_3.4.3-13_sh4.deb gcc-3.4-base_3.4.3-13_sh4.deb libgcj5_3.4.3-13_sh4.deb gcc-3.4-doc_3.4.3-13_all.deb libobjc1_3.4.3-13_sh4.deb gcc-3.4_3.4.3-13_sh4.deb libstdc++6-dbg_3.4.3-13_sh4.deb gcj-3.4_3.4.3-13_sh4.deb libstdc++6-dev_3.4.3-13_sh4.deb gij-3.4_3.4.3-13_sh4.deb libstdc++6-doc_3.4.3-13_all.deb gobjc-3.4_3.4.3-13_sh4.deb libstdc++6-pic_3.4.3-13_sh4.deb gpc-2.1-3.4-doc_3.4.3-13_all.deb libstdc++6_3.4.3-13_sh4.deb gpc-2.1-3.4_3.4.3-13_sh4.deb protoize_3.4.3-13_sh4.deb libffi3-dev_3.4.3-13_sh4.deb treelang-3.4_3.4.3-13_sh4.deb libffi3_3.4.3-13_sh4.deb
glibc-2.3.2-sh-fpscr_values glibc-2.3.3-sh-linux-fcntl_h glibc-2.3.3-sh-nptl-multidir glibc-2.3.4-sh-dl-machine_h glibc-2.3.5-sh-wordexp glibc-2.3.5-sh-lowlevellock
BUILD_CC = gcc
echo "LIBGD = no" >> $(DEB_BUILDDIR)/configparms echo "sysconfdir = /etc" >> $(DEB_BUILDDIR)/configparms echo "rootsbindir = /sbin" >> $(DEB_BUILDDIR)/configparms echo "CFLAGS-rtld.os := -O -finline-limit=4800 ←↓改行しない --param max-inline-insns-single=4800" >> $(DEB_BUILDDIR)/configparms echo "no-z-defs=yes" >> $(DEB_BUILDDIR)/configparms ifneq ($(call xx,slibdir),) echo "slibdir = $(call xx,slibdir)" >> $(DEB_BUILDDIR)/configparms endif
nptl_extra_cflags = -g0 -O2 -fno-unit-at-a-time
GLIBC_PASSES += nptl nptl_extra_cflags += -O2
dpkg-checkbuilddeps: Unmet build dependencies: gcc-4.0
glibc-doc_2.3.5-6_all.deb libc6_2.3.5-6_sh4.deb libc6-dbg_2.3.5-6_sh4.deb libnss-dns-udeb_2.3.5-6_sh4.udeb libc6-dev_2.3.5-6_sh4.deb libnss-files-udeb_2.3.5-6_sh4.udeb libc6-pic_2.3.5-6_sh4.deb locales_2.3.5-6_all.deb libc6-prof_2.3.5-6_sh4.deb nscd_2.3.5-6_sh4.deb libc6-udeb_2.3.5-6_sh4.udeb