hns - 日記自動生成システム - Version 2.19.9

先月 2009年01月 来月
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
Namazu for hns による簡易全文検索
詳しくは 詳細指定/ヘルプを参照して下さい
検索式:

2009年01月06日(火) 旧暦 [n年日記] [更新:"2009/01/06 12:59:45"]

#1 [gcc] gcc-4.2.1 で --enable-checking

In info from gcc-4.2.1, I read in 9.2 Overview, --enable-checking is explained. It is said as
For safety, it is useful to configure GCC with `--enable-checking'. Although this results in a significant performance penalty (since all tree types are checked at run-time), and is therefore inappropriate in a release version, it is extremely helpful during the development process.
So I have tried for i386 as:
   138  11:09   cd /export/local-src/
   140  11:09   mkdir gcc-4.2.1-i386-enable-checking
   141  11:09   cd gcc-4.2.1-i386-enable-checking
   142  11:10   ../gcc-4.2.1-dont-modify/configure --host=i386--netbsd --enable-languages=c
   143  11:10   gmake
But I am getting
../../gcc-4.2.1-dont-modify/gcc/libgcc2.c:673: warning: alignment of '__clz_tab' is greater than maximum object file alignment. Using 16
../../gcc-4.2.1-dont-modify/gcc/libgcc2.c:673: warning: alignment of '__clz_tab' is greater than maximum object file alignment. Using 16
/var/tmp//ccXhI8ct.s: Assembler messages:
/var/tmp//ccXhI8ct.s:377: Error: alignment not a power of 2
gmake[4]: *** [libgcc/./_clz.o] Error 1
gmake[4]: Leaving directory `/export/local-src/gcc-4.2.1-i386-enable-checking/gcc'
gmake[3]: *** [libgcc.a] Error 2
Shall I look for 4.2.4 instead of 4.2.1 ?
/export/local-src/gcc-4.2.4-enable-checking/./gcc/xgcc -B/export/local-src/gcc-4.2.4-enable-checking/./gcc/ -B/usr/local/i386--netbsd/bin/ -B/usr/local/i386--netbsd/lib/ -isystem /usr/local/i386--netbsd/include -isystem /usr/local/i386--netbsd/sys-include -O2 -O2 -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -g -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -I. -I. -I../../gcc-4.2.4/gcc -I../../gcc-4.2.4/gcc/. -I../../gcc-4.2.4/gcc/../include -I./../intl -I../../gcc-4.2.4/gcc/../libcpp/include -I../../gcc-4.2.4/gcc/../libdecnumber -I../libdecnumber -DL_clz -c ../../gcc-4.2.4/gcc/libgcc2.c -o libgcc/./_clz.o
../../gcc-4.2.4/gcc/libgcc2.c:673: warning: alignment of '__clz_tab' is greater than maximum object file alignment. Using 16
../../gcc-4.2.4/gcc/libgcc2.c:673: warning: alignment of '__clz_tab' is greater than maximum object file alignment. Using 16
/var/tmp//ccnOUlHg.s: Assembler messages:
/var/tmp//ccnOUlHg.s:377: Error: alignment not a power of 2
gmake[4]: *** [libgcc/./_clz.o] Error 1
gmake[4]: Leaving directory `/export/local-src/gcc-4.2.4-enable-checking/gcc'
gmake[3]: *** [libgcc.a] Error 2
Even with 4.2.4, the same thing on this issue as above.
375          .stabs  "DWunion:t236=237=u8s:235,0,64;ll:223,0,64;;",128,0,423,0
376  .globl ___clz_tab
377          .align 5,0x90
378          .type   ___clz_tab, @object
379          .size   ___clz_tab, 256
380  ___clz_tab:
381          .byte   0
382          .byte   1
383          .byte   2
384          .byte   2
To my understanding, align 5 means align 2^5, two to the power of 5, = 32, Leaning to the problem gas side ?
From the info for gas:
The first expression (which must be absolute) is the alignment required, as described below.
....
The way the required alignment is specified varies from system to system. For the arc, hppa, i386 using ELF, i860, iq2000, m68k, or32, s390, sparc, tic4x, tic80 and xtensa, the first expression is the alignment request in bytes.
No, it looks gcc side problem, or gcc thinks it is two to the power of, and gas thinks it is in bytes.

gcc (GCC) 4.1.2 20061021 prerelease (NetBSD nb3 20061125)
output as align 32 (but this is without --enable-checking)b

 10  .globl __clz_tab
 11          .section        .rodata
l 12          .align 32
 13          .type   __clz_tab, @object
 14          .size   __clz_tab, 256
the patch applied.
--- gcc-4.2.4/gcc/config/i386/bsd.h~	2007-09-02 00:28:30.000000000 +0900
+++ gcc-4.2.4/gcc/config/i386/bsd.h	2009-01-06 12:51:08.000000000 +0900
@@ -70,7 +70,7 @@
    to a multiple of 2**LOG bytes.  */
 
 #define ASM_OUTPUT_ALIGN(FILE,LOG)	\
-  if ((LOG)!=0) fprintf ((FILE), "\t.align %d\n", (LOG))
+  if ((LOG)!=0) fprintf ((FILE), "\t.align %d\n", 1<<(LOG))
 
 /* This is how to store into the string BUF
    the symbol_ref name of an internal numbered label where
--- gcc-4.2.4/gcc/config/i386/netbsd.h~	2004-07-18 06:09:14.000000000 +0900
+++ gcc-4.2.4/gcc/config/i386/netbsd.h	2009-01-06 12:55:50.000000000 +0900
@@ -41,7 +41,7 @@
    segment.  */
 #undef ASM_OUTPUT_ALIGN
 #define ASM_OUTPUT_ALIGN(FILE,LOG) \
-  if ((LOG)!=0) fprintf ((FILE), "\t.align %d,0x90\n", (LOG))
+  if ((LOG)!=0) fprintf ((FILE), "\t.align %d,0x90\n", 1<<(LOG))
 
 /* Profiling routines, partially copied from i386/osfrose.h.  */
 
and now getting:
checking for i386--netbsd-gcc... /export/local-src/gcc-4.2.4-enable-checking/./prev-gcc/xgcc -B/export/local-src/gcc-4.2.4-enable-checking/./prev-gcc/ -B/usr/local/i386--netbsd/bin/
checking for C compiler default output file name... configure: error: C compiler cannot create executables
See `config.log' for more details.
config.log shows:
/usr/bin/ld: warning: type and size of dynamic symbol `_fini' are not defined
/usr/bin/ld: warning: cannot find entry symbol start; defaulting to 08048334
/usr/lib/crt0.o: In function `___start':
: undefined reference to `main'
/export/local-src/gcc-4.2.4-enable-checking/./prev-gcc/libgcc.a(__main.o): In function `__do_global_ctors':
/export/local-src/gcc-4.2.4-enable-checking/gcc/../../gcc-4.2.4/gcc/libgcc2.c:2146: undefined reference to `_atexit'



最近の日記
2024年03月10日
停電 (瞬電)
2024年03月03日
the second try on bare-metal
useradd
2024年02月29日
opendkim and senmail
2024年01月24日
chat/iam 0.0.8
2024年01月21日
uselocale vs setlocale (textproc/R-readxl)
以上、1 日分です。
タイトル一覧
カテゴリ分類
Powered by hns-2.19.9, HyperNikkiSystem Project

Count.cgi (since 2000/02/05)