takk@deb9:~/gcc$ ls
gcc-defaults-1.168 gcc-defaults_1.168.dsc gcc-defaults_1.168.tar.gz
takk@deb9:~/gcc$ cd
展開されたディレクトリへ進んで中身をみてみます。
takk@deb9:~/gcc$ cd gcc-defaults-1.168/
takk@deb9:~/gcc/gcc-defaults-1.168$ ls
c89 c89.1 c99 c99.1 classpath.security debian gfdl.7 gpl.7
takk@deb9:~/gcc/gcc-defaults-1.168$
各ファイルの概要です。
takk@deb9:~/gcc/gcc-defaults-1.168$ file *
c89: POSIX shell script, ASCII text executable
c89.1: troff or preprocessor input, ASCII text
c99: POSIX shell script, ASCII text executable
c99.1: troff or preprocessor input, ASCII text
classpath.security: ASCII text
debian: directory
gfdl.7: troff or preprocessor input, ASCII text
gpl.7: troff or preprocessor input, ASCII text
takk@deb9:~/gcc/gcc-defaults-1.168$
takk@deb9:~$ apt-cache search gcc | head
gcc-6-hppa64-linux-gnu - GNU C compiler (cross compiler for hppa64)
gcc-6-locales - GCC, the GNU compiler collection (native language support files)
gcc-6-multilib - GNU C compiler (multilib support)
gcc-6-source - Source of the GNU Compiler Collection
gcc-6-test-results - Test results for the GCC test suite
gccgo-6-multilib - GNU Go compiler (multilib support)
gcj-6 - GCJ byte code and native compiler for Java(TM)
gcj-6-jdk - GCJ and Classpath development tools for Java(TM)
gdc-6-multilib - GNU D compiler (version 2, multilib support)
gfortran-6-multilib - GNU Fortran compiler (multilib support)
takk@deb9:~$
takk@deb9:~/gcc/gcc-6-6.3.0$ tar xJf gcc-6.3.0-dfsg.tar.xz
takk@deb9:~/gcc/gcc-6-6.3.0$ ls
debian gcc-6.3.0 gcc-6.3.0-dfsg.tar.xz gdc-20161222.tar.xz
takk@deb9:~/gcc/gcc-6-6.3.0$ cd gcc-6.3.0/
takk@deb9:~/gcc/gcc-6-6.3.0/gcc-6.3.0$
takk@deb9:~/gcc/gcc-6-6.3.0/gcc-6.3.0$ cat -n !$
cat -n gcc/main.c
1 /* main.c: defines main() for cc1, cc1plus, etc.
2 Copyright (C) 2007-2016 Free Software Foundation, Inc.
3
4 This file is part of GCC.
5
6 GCC is free software; you can redistribute it and/or modify it under
7 the terms of the GNU General Public License as published by the Free
8 Software Foundation; either version 3, or (at your option) any later
9 version.
10
11 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with GCC; see the file COPYING3. If not see
18 <http://www.gnu.org/licenses/>. */
19
20 #include "config.h"
21 #include "system.h"
22 #include "coretypes.h"
23 #include "tm.h"
24 #include "diagnostic-core.h"
25 #include "toplev.h"
26
27 int main (int argc, char **argv);
28
29 /* We define main() to call toplev::main(), which is defined in toplev.c.
30 We do this in a separate file in order to allow the language front-end
31 to define a different main(), if it so desires. */
32
33 int
34 main (int argc, char **argv)
35 {
36 toplev toplev (NULL, /* external_timer */
37 true /* init_signals */);
38
39 return toplev.main (argc, argv);
40 }
takk@deb9:~/gcc/gcc-6-6.3.0/gcc-6.3.0$
takk@deb9:~/gcc/gcc-6-6.3.0/gcc-6.3.0$ cat -n gcc/toplev.h
1 /* toplev.h - Various declarations for functions found in toplev.c
2 Copyright (C) 1998-2016 Free Software Foundation, Inc.
3
4 This file is part of GCC.
5
6 GCC is free software; you can redistribute it and/or modify it under
7 the terms of the GNU General Public License as published by the Free
8 Software Foundation; either version 3, or (at your option) any later
9 version.
10
11 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with GCC; see the file COPYING3. If not see
18 <http://www.gnu.org/licenses/>. */
19
20 #ifndef GCC_TOPLEV_H
21 #define GCC_TOPLEV_H
22
23 /* Decoded options, and number of such options. */
24 extern struct cl_decoded_option *save_decoded_options;
25 extern unsigned int save_decoded_options_count;
26
27 class timer;
28
29 /* Invoking the compiler. */
30 class toplev
31 {
32 public:
33 toplev (timer *external_timer,
34 bool init_signals);
35 ~toplev ();
36
37 int main (int argc, char **argv);
38
39 void finalize ();
40
41 private:
42
43 void start_timevars ();
44
45 bool m_use_TV_TOTAL;
46 bool m_init_signals;
47 };
48
49 extern void rest_of_decl_compilation (tree, int, int);
50 extern void rest_of_type_compilation (tree, int);
51 extern void init_optimization_passes (void);
52 extern bool enable_rtl_dump_file (void);
53
54 /* In except.c. Initialize exception handling. This is used by the Ada
55 and LTO front ends to initialize EH "on demand". See lto-streamer-in.c
56 and ada/gcc-interface/misc.c. */
57 extern void init_eh (void);
58
59 extern void announce_function (tree);
60
61 extern void wrapup_global_declaration_1 (tree);
62 extern bool wrapup_global_declaration_2 (tree);
63 extern bool wrapup_global_declarations (tree *, int);
64
65 extern void global_decl_processing (void);
66
67 extern void dump_memory_report (bool);
68 extern void dump_profile_report (void);
69
70 extern void target_reinit (void);
71
72 /* A unique local time stamp, might be zero if none is available. */
73 extern unsigned local_tick;
74
75 /* True if the user has tagged the function with the 'section'
76 attribute. */
77
78 extern bool user_defined_section_attribute;
79
80 /* See toplev.c. */
81 extern int flag_rerun_cse_after_global_opts;
82
83 extern void print_version (FILE *, const char *, bool);
84
85 /* The hashtable, so that the C front ends can pass it to cpplib. */
86 extern struct ht *ident_hash;
87
88 /* Functions used to get and set GCC's notion of in what directory
89 compilation was started. */
90
91 extern const char *get_src_pwd (void);
92 extern bool set_src_pwd (const char *);
93
94 /* Functions used to manipulate the random seed. */
95
96 extern HOST_WIDE_INT get_random_seed (bool);
97 extern const char *set_random_seed (const char *);
98
99 extern void initialize_rtl (void);
100
101 #endif /* ! GCC_TOPLEV_H */
takk@deb9:~/gcc/gcc-6-6.3.0/gcc-6.3.0$
takk@deb9:~/gcc/gcc-6-6.3.0/gcc-6.3.0$ ./configure
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for a sed that does not truncate output... /bin/sed
checking for gawk... gawk
checking for libatomic support... yes
checking for libcilkrts support... yes
checking for libitm support... yes
checking for libsanitizer support... yes
checking for libvtv support... yes
checking for libmpx support... yes
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking whether g++ accepts -static-libstdc++ -static-libgcc... yes
checking for gnatbind... no
checking for gnatmake... no
checking whether compiler driver understands Ada... no
checking how to compare bootstrapped objects... cmp --ignore-initial=16 $$f1 $$f2
checking for objdir... .libs
checking for the correct version of gmp.h... no
configure: error: Building GCC requires GMP 4.2+, MPFR 2.4.0+ and MPC 0.8.0+.
Try the --with-gmp, --with-mpfr and/or --with-mpc options to specify
their locations. Source code for these libraries can be found at
their respective hosting sites as well as at
ftp://gcc.gnu.org/pub/gcc/infrastructure/. See also
for additional info. If
you obtained GMP, MPFR and/or MPC from a vendor distribution package,
make sure that you have installed both the libraries and the header
files. They may be located in separate packages.
takk@deb9:~/gcc/gcc-6-6.3.0/gcc-6.3.0$
エラーが出て停止しました。
configure: error: Building GCC requires GMP 4.2+, MPFR 2.4.0+ and MPC 0.8.0+.
ん~。見知らぬツールです。 apt-cacheで関連してそうなパッケージを探します。
takk@deb9:~/gcc/gcc-6-6.3.0/gcc-6.3.0$ apt-cache search GMP
~他省略~
libgivaro-dev - arithmetic and algebraic computations - development files
libgivaro-doc - Documentation for Givaro
libgivaro9 - arithmetic and algebraic computations
libgmp-dev - Multiprecision arithmetic library developers tools
libgmp10-doc - Multiprecision arithmetic library example code
libgmp3-dev - Multiprecision arithmetic library developers tools
~他省略~
takk@deb9:~/tmp$ cd /usr/share/doc/libgmp10
takk@deb9:/usr/share/doc/libgmp10$ ls
README.Debian changelog.Debian.gz copyright
takk@deb9:/usr/share/doc/libgmp10$
takk@deb9:/usr/share/doc/libgmp10$ cat -n README.Debian
1 Documentation and Example Code
2 ------------------------------
3
4 Sadly, due to licensing the GMP documentation is no longer shipped in
5 Debian. The package libgmp10-doc now contains only demo code.
6
7 Please see http://gmplib.org/manual/ for the documentation.
8
9
10 -- Steve M. Robbins <smr@debian.org>, Sat, 06 Nov 2010 18:00:53 -0500
takk@deb9:/usr/share/doc/libgmp10$
LZIP(1) User Commands LZIP(1)
NAME
lzip - reduces the size of files
SYNOPSIS
lzip [options] [files]
DESCRIPTION
Lzip - LZMA lossless data compressor.
OPTIONS
-h, --help
display this help and exit
-V, --version
output version information and exit
-a, --trailing-error
exit with error status if trailing data
-b, --member-size=<bytes>
set member size limit in bytes
-c, --stdout
write to standard output, keep input files
-d, --decompress
decompress
-f, --force
overwrite existing output files
~省略~
-dオプションを使えば良いようです。
takk@deb9:~/gcc$ ls
gcc-6-6.3.0 gcc-6_6.3.0-18+deb9u1.dsc gmp-6.1.2.tar.lz
gcc-6_6.3.0-18+deb9u1.diff.gz gcc-6_6.3.0.orig.tar.gz
takk@deb9:~/gcc$ lzip -d gmp-6.1.2.tar.lz
takk@deb9:~/gcc$ ls
gcc-6-6.3.0 gcc-6_6.3.0-18+deb9u1.dsc gmp-6.1.2.tar
gcc-6_6.3.0-18+deb9u1.diff.gz gcc-6_6.3.0.orig.tar.gz
takk@deb9:~/gcc$
takk@deb9:~/gcc/gmp-6.1.2$ make
~省略~
takk@deb9:~/gcc/gmp-6.1.2$
続けて、make install。
takk@deb9:~/gcc/gmp-6.1.2$ sudo make install
~省略~
+-------------------------------------------------------------+
| CAUTION: |
| |
| If you have not already run "make check", then we strongly |
| recommend you do so. |
| |
| GMP has been carefully tested by its authors, but compilers |
| are all too often released with serious bugs. GMP tends to |
| explore interesting corners in compilers and has hit bugs |
| on quite a few occasions. |
| |
+-------------------------------------------------------------+
make[4]: ディレクトリ '/home/takk/gcc/gmp-6.1.2' から出ます
make[3]: ディレクトリ '/home/takk/gcc/gmp-6.1.2' から出ます
make[2]: ディレクトリ '/home/takk/gcc/gmp-6.1.2' から出ます
make[1]: ディレクトリ '/home/takk/gcc/gmp-6.1.2' から出ます
takk@deb9:~/gcc/gmp-6.1.2$
コメント