| 14:03:47 | sjhill | hello mjn3 |
| 14:04:41 | mjn3 | morning |
| 14:04:52 | mjn3 | how goes it? |
| 14:05:50 | sjhill | really well i think |
| 14:06:09 | sjhill | i'm going to be uploading precompiled mips uclibc toolchain RPMS soon |
| 14:07:22 | mjn3 | that's good. i spent most of last week building tinyx and mozilla for the zaurus, only to find that mozilla won't fit in the builtin flash :-(, so the client is "rethinking" |
| 14:07:37 | sjhill | heh |
| 14:07:54 | sjhill | i thought Qt had a nice little browser? |
| 14:08:04 | sjhill | err, TrollTech |
| 14:08:10 | sjhill | Century Software too |
| 14:08:26 | mjn3 | that's cool. i've been doing a little cleanup lately, but i'll be working on uClibc pretty much fulltime soon to finish the i10n/i18n stuff |
| 14:08:42 | sjhill | that's awesome! |
| 14:09:12 | mjn3 | they do.. there's Konqueror/embedded. and the zaurus comes with opera. but my client needs flash plugin support. |
| 14:09:25 | sjhill | ah |
| 14:09:49 | sjhill | is the CF slot being used? |
| 14:09:57 | sjhill | wait, duh, of course it is |
| 14:10:04 | mjn3 | the deadline for the i10n/i18n stuff is mid November, but i'll probably have it done before that |
| 14:10:05 | sjhill | if they want Internet access |
| 14:10:30 | sjhill | mjn3 do you and Erik do contract work together? |
| 14:10:39 | mjn3 | they're putting a wireless network card in the CF slot. |
| 14:10:41 | sjhill | *sigh* sorry, meant that to be private |
| 14:10:51 | sjhill | k |
| 14:10:53 | mjn3 | no problem |
| 14:11:05 | mjn3 | actually, i'm subcontracting under erik for that stuff |
| 14:11:16 | sjhill | cool |
| 14:11:30 | mjn3 | the zaurus project was something he was contacted about, but his plate was full so he passed it on to me |
| 14:12:43 | mjn3 | actually, i've never met Erik. i live down here in the swamps... Lafayette, LA. I from New Orleans |
| 14:13:21 | sjhill | oh...one of those "Southern" people :) |
| 14:14:25 | mjn3 | further south than that... my grandfather came to New Orleans on a banana boat when he was 15 from a small town near Veracruz. ;-) |
| 14:14:42 | sjhill | wow |
| 14:15:33 | mjn3 | i'm kind of an english/german/spanish mix, living in the heart of cajun country. |
| 14:16:26 | sjhill | is just a normal caucasion...german/czech descent |
| 14:16:57 | sjhill | *grr* this #include problem is driving me nuts |
| 14:17:42 | sjhill | so, i have a program that #include <limits.h>, yet it still says '_POSIX_PATH_MAX' is undefined even though 'limit.h' includes 'bits/posix1_lim.h' |
| 14:20:24 | mjn3 | sorry.. door. hmm |
| 14:21:40 | sjhill | hmmm, if i #include <bits/posix1_lim.h> it's okay.... |
| 14:21:58 | mjn3 | sjhill: are you defining _POSIX_SOURCE or one of the other macros from features.h to make sure it actually does the include? |
| 14:23:11 | sjhill | mjn3: do i have to explicitly? |
| 14:23:19 | sjhill | i though it was taken care of at uclibc build time |
| 14:23:53 | mjn3 | is this internal uClibc code? what are you trying to build? |
| 14:25:18 | sjhill | 'sec |
| 14:37:10 | sjhill | i'm still finishing up building of the Linux Test Project |
| 14:37:49 | mjn3 | ah |
| 14:38:28 | mjn3 | if you are building an external app, then you need to do the appropriate define to enable the features you want |
| 14:39:21 | sjhill | i'm compiling with a "native" uclibc toolchain, should i have configured gcc differently? |
| 14:39:51 | sjhill | i've also got some undefined THREADS #defines missing too, maybe --enable-threads wasn't enough |
| 14:40:49 | mjn3 | no. it isn't a toolchain issue. the glibc headers are set up so that you can enable or disable certain things in the header files. this is for compliance with the various standards bodies. see features.h for info |
| 14:42:39 | sjhill | mipsel-uclibc-gcc -I../../../../include -D_POSIX_SOURCE -D_POSIX_C_SOURCE fcntl07.c -L../../../../lib -lltp -o fcntl07 |
| 14:42:39 | sjhill | fcntl07.c:177: `_POSIX_PATH_MAX' undeclared here (not in a function) |
| 14:42:40 | sjhill | fcntl07.c:177: storage size of `subprog_path' isn't known |
| 14:42:40 | sjhill | make: *** [fcntl07] Error 1 |
| 14:43:19 | sjhill | wait |
| 14:44:04 | sjhill | bear with me, so defining those didn't work |
| 14:44:29 | mjn3 | hmm |
| 14:48:14 | mjn3 | running some tests |
| 14:59:50 | mjn3 | sjhill: hmm. i just ran some tests, and it seems like _POSIX_PATH_MAX is being defined for me, even without the feature macros. this is with the gcc wrapper on both i386 and mips, and with native toolchains (gcc 3.2) for i386 and arm |
| 15:00:44 | sjhill | i'm not using the wrapper....hmmm |
| 15:01:28 | sjhill | Reading specs from /opt/toolchains/uclibc/lib/gcc-lib/mipsel-linux/3.2/specs |
| 15:01:28 | sjhill | Configured with: ../gcc-3.2/configure --prefix=/opt/toolchains/uclibc --target=mipsel-linux --enable-target-optspace --disable-nls --with-gnu-ld --enable-shared --enable-threads --enable-languages=c,c++ --infodir=/opt/toolchains/uclibc/info --mandir=/opt/toolchains/uclibc/man --includedir=/opt/toolchains/uclibc/mipsel-linux/include --with-gxx-include-dir=/opt/toolchains/uclibc/mipsel-linux/include/g++-v3 --disable-checking --program-transform-na |
| 15:01:28 | sjhill | me=s,^,mipsel-uclibc-, |
| 15:01:28 | sjhill | Thread model: posix |
| 15:01:30 | sjhill | gcc version 3.2 |
| 15:01:34 | sjhill | /opt/toolchains/uclibc/lib/gcc-lib/mipsel-linux/3.2/cc1 -lang-c -v -I../../../../include -D__GNUC__=3 -D__GNUC_MINOR__=2 -D__GNUC_PATCHLEVEL__=0 -D__GXX_ABI_VERSION=102 -DMIPSEL -D_MIPSEL -Dunix -Dmips -D_mips -DR3000 -D_R3000 -D__gnu_linux__ -Dlinux -D__ELF__ -D__PIC__ -D__pic__ -D__MIPSEL__ -D_MIPSEL -D__unix__ -D__mips__ -D__mips__ -D__R3000__ -D_R3000 -D__gnu_linux__ -D__linux__ -D__ELF__ -D__PIC__ -D__pic__ -D__MIPSEL -D__unix -D__mips -D_ |
| 15:01:39 | sjhill | _mips -D__R3000 -D__linux -Asystem=posix -Acpu=mips -Amachine=mips -D__NO_INLINE__ -D__STDC_HOSTED__=1 -D__LANGUAGE_C -D_LANGUAGE_C -DLANGUAGE_C -D__SIZE_TYPE__=unsigned int -D__PTRDIFF_TYPE__=int -D__mips_fpr=32 -D_MIPS_FPSET=32 -D_MIPS_ISA=_MIPS_ISA_MIPS1 -D_MIPS_SIM=_MIPS_SIM_ABI32 -D_MIPS_SZINT=32 -D_MIPS_SZLONG=32 -D_MIPS_SZPTR=32 -U__mips -D__mips -U__mips64 -D__USE_POSIX fcntl07.c -quiet -dumpbase fcntl07.c -version -o /tmp/ccIK7Mx7.s |
| 15:01:44 | sjhill | GNU CPP version 3.2 (cpplib) (MIPSel GNU/Linux with ELF) |
| 15:01:46 | sjhill | GNU C version 3.2 (mipsel-linux) |
| 15:01:48 | sjhill | compiled by GNU C version 2.96 20000731 (Red Hat Linux 7.2 2.96-108.7.2). |
| 15:01:50 | sjhill | ignoring nonexistent directory "/opt/toolchains/uclibc/include" |
| 15:01:52 | sjhill | ignoring nonexistent directory "/opt/toolchains/uclibc/mipsel-linux/sys-include"#include "..." search starts here: |
| 15:01:55 | sjhill | #include <...> search starts here: |
| 15:01:57 | sjhill | ../../../../include |
| 15:01:59 | sjhill | /opt/toolchains/uclibc/lib/gcc-lib/mipsel-linux/3.2/include |
| 15:02:01 | sjhill | /opt/toolchains/uclibc/mipsel-linux/include |
| 15:02:05 | sjhill | End of search list. |
| 15:02:07 | sjhill | fcntl07.c:177: `_POSIX_PATH_MAX' undeclar |
| 15:05:24 | mjn3 | for the following 2-line tlimit.c file: |
| 15:05:29 | mjn3 | #include <limits.h> |
| 15:05:29 | mjn3 | posix path max is _POSIX_PATH_MAX |
| 15:06:26 | mjn3 | if i do the following, i see that posix1_lim.h gets included a couple of times |
| 15:06:30 | mjn3 | PATH=/archive/work/toolchain/gcc-3.2/toolchain-arm/usr/bin/:$PATH gcc -E tlimits.c | grep -v "^ *$" | less |
| 15:06:58 | sjhill | 'sec ... manager called on phone |
| 15:07:54 | mjn3 | sure |
| 15:30:36 | sjhill | # 1 "fcntl07.c" |
| 15:30:37 | sjhill | # 1 "<built-in>" |
| 15:30:37 | sjhill | # 1 "<command line>" |
| 15:30:37 | sjhill | # 1 "fcntl07.c" |
| 15:30:37 | sjhill | # 134 "fcntl07.c" |
| 15:30:37 | sjhill | # 1 "/opt/toolchains/uclibc/lib/gcc-lib/mipsel-linux/3.2/include/limits.h" 1 3 |
| 15:30:39 | sjhill | # 135 "fcntl07.c" 2 |
| 15:31:06 | mjn3 | sjhill: i think the problem is related to features.h actually... running more tests. |
| 15:31:24 | sjhill | however...i put '#error fdsjklfsd' as the first line in the 'limits.h' file, and it didn't stop it from compiling |
| 15:40:07 | mjn3 | sjhill: new example... tfeatures.c |
| 15:40:29 | mjn3 | posix source is _POSIX_SOURCE |
| 15:40:29 | mjn3 | posix c source is _POSIX_C_SOURCE |
| 15:40:29 | mjn3 | xopen source is _XOPEN_SOURCE |
| 15:40:29 | mjn3 | strict ansi is __STRICT_ANSI__ |
| 15:40:29 | mjn3 | #ifdef __STRICT_ANSI__ |
| 15:40:31 | mjn3 | defined |
| 15:40:33 | mjn3 | #endif |
| 15:40:35 | mjn3 | use posix is __USE_POSIX |
| 15:40:37 | mjn3 | #include <features.h> |
| 15:40:39 | mjn3 | posix source is _POSIX_SOURCE |
| 15:40:42 | mjn3 | posix c source is _POSIX_C_SOURCE |
| 15:40:43 | mjn3 | xopen source is _XOPEN_SOURCE |
| 15:40:46 | mjn3 | strict ansi is __STRICT_ANSI__ |
| 15:40:47 | mjn3 | #ifdef __STRICT_ANSI__ |
| 15:40:49 | mjn3 | defined |
| 15:40:51 | mjn3 | #endif |
| 15:40:53 | mjn3 | use posix is __USE_POSIX |
| 15:41:03 | mjn3 | sjhill: with (suitable path) gcc -E tfeatures.c | grep -v "^ *$" |
| 15:41:06 | mjn3 | i get |
| 15:41:42 | mjn3 | # 1 "tfeatures.c" |
| 15:41:42 | mjn3 | # 1 "<built-in>" |
| 15:41:42 | mjn3 | # 1 "<command line>" |
| 15:41:42 | mjn3 | # 1 "tfeatures.c" |
| 15:41:42 | mjn3 | posix source is _POSIX_SOURCE |
| 15:41:43 | mjn3 | posix c source is _POSIX_C_SOURCE |
| 15:41:45 | mjn3 | xopen source is _XOPEN_SOURCE |
| 15:41:47 | mjn3 | strict ansi is __STRICT_ANSI__ |
| 15:41:49 | mjn3 | use posix is __USE_POSIX |
| 15:41:51 | mjn3 | # 1 "/archive/work/toolchain/gcc-3.2/toolchain-i386/usr/lib/gcc-lib/../../i386-linux/sys-include/features.h" 1 3 |
| 15:41:54 | mjn3 | # 301 "/archive/work/toolchain/gcc-3.2/toolchain-i386/usr/lib/gcc-lib/../../i386-linux/sys-include/features.h" 3 |
| 15:41:57 | mjn3 | # 1 "/archive/work/toolchain/gcc-3.2/toolchain-i386/usr/lib/gcc-lib/../../i386-linux/sys-include/sys/cdefs.h" 1 3 |
| 15:42:02 | mjn3 | # 302 "/archive/work/toolchain/gcc-3.2/toolchain-i386/usr/lib/gcc-lib/../../i386-linux/sys-include/features.h" 2 3 |
| 15:42:05 | mjn3 | # 336 "/archive/work/toolchain/gcc-3.2/toolchain-i386/usr/lib/gcc-lib/../../i386-linux/sys-include/features.h" 3 |
| 15:42:08 | mjn3 | # 1 "/archive/work/toolchain/gcc-3.2/toolchain-i386/usr/lib/gcc-lib/../../i386-linux/sys-include/bits/uClibc_config.h" 1 3 |
| 15:42:11 | mjn3 | # 337 "/archive/work/toolchain/gcc-3.2/toolchain-i386/usr/lib/gcc-lib/../../i386-linux/sys-include/features.h" 2 3 |
| 15:42:14 | mjn3 | # 10 "tfeatures.c" 2 |
| 15:42:16 | mjn3 | posix source is 1 |
| 15:42:18 | mjn3 | posix c source is 199506L |
| 15:42:20 | mjn3 | xopen source is _XOPEN_SOURCE |
| 15:42:22 | mjn3 | strict ansi is __STRICT_ANSI__ |
| 15:42:24 | mjn3 | use posix is 1 |
| 15:43:01 | mjn3 | sjhill: so _USE_POSIX gets set by features.h if you don't set any other defines. _but_ if you set -ansi, then it doesn't. the pertinent lines in features.h are: |
| 15:43:19 | mjn3 | (and IEEE Std 1003.1b-1993 unless _XOPEN_SOURCE is defined). */ |
| 15:43:19 | mjn3 | #if (!defined __STRICT_ANSI__ && !defined _POSIX_SOURCE && \ |
| 15:43:19 | mjn3 | !defined _POSIX_C_SOURCE) |
| 15:43:19 | mjn3 | # define _POSIX_SOURCE1 |
| 15:43:19 | mjn3 | # if defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) < 500 |
| 15:43:21 | mjn3 | # define _POSIX_C_SOURCE2 |
| 15:43:23 | mjn3 | # else |
| 15:43:25 | mjn3 | # define _POSIX_C_SOURCE199506L |
| 15:43:27 | mjn3 | # endif |
| 15:43:29 | mjn3 | #endif |
| 15:45:30 | sjhill | i think i found the problem |
| 15:45:42 | sjhill | i'm using gcc-3.2, what are you using? |
| 15:47:46 | sjhill | look at this: |
| 15:48:22 | mjn3 | native toolchains for arm and i386 is gcc 3.2. i386 wrapper is 2.95.4 (debian). mips wrapper is 2.95.4 debian too |
| 15:48:35 | sjhill | # 134 "fcntl07.c" |
| 15:48:35 | sjhill | # 1 "/opt/toolchains/uclibc/lib/gcc-lib/mipsel-linux/3.2/include/limits.h" 1 3 |
| 15:48:35 | sjhill | # 135 "fcntl07.c" 2 |
| 15:48:54 | sjhill | #include "..." search starts here: |
| 15:48:54 | sjhill | #include <...> search starts here: |
| 15:48:54 | sjhill | ../../../../include |
| 15:48:54 | sjhill | /opt/toolchains/uclibc/lib/gcc-lib/mipsel-linux/3.2/include |
| 15:48:54 | sjhill | /opt/toolchains/uclibc/mipsel-linux/include |
| 15:49:02 | sjhill | it's using GCC's header first |
| 15:49:09 | sjhill | if i remove GCC's 'limit. |
| 15:49:32 | sjhill | h' and remove #include_next out of uclibc's limit.h, it works |
| 15:51:59 | mjn3 | hmm. well, first i'd run the features test above to make sure that it agrees... i.e. that _USE_POSIX is getting defined. if so, then i'd make sure that it is still defined after the include_next in limits.h (uclib) |
| 15:52:49 | sjhill | hmmm, adding '-I/opt/toolchains/uclibc/mipsel-linux/include' and returning all headers to normal works too |
| 15:53:29 | sjhill | mjn3: dump 'tfeatures.c' for me pls |
| 15:54:56 | mjn3 | posix source is _POSIX_SOURCE |
| 15:54:56 | mjn3 | posix c source is _POSIX_C_SOURCE |
| 15:54:56 | mjn3 | xopen source is _XOPEN_SOURCE |
| 15:54:56 | mjn3 | strict ansi is __STRICT_ANSI__ |
| 15:54:56 | mjn3 | #ifdef __STRICT_ANSI__ |
| 15:54:56 | mjn3 | defined |
| 15:54:59 | mjn3 | #endif |
| 15:55:00 | mjn3 | use posix is __USE_POSIX |
| 15:55:02 | mjn3 | #include <features.h> |
| 15:55:07 | mjn3 | posix source is _POSIX_SOURCE |
| 15:55:08 | mjn3 | posix c source is _POSIX_C_SOURCE |
| 15:55:10 | mjn3 | xopen source is _XOPEN_SOURCE |
| 15:55:12 | mjn3 | strict ansi is __STRICT_ANSI__ |
| 15:55:14 | mjn3 | #ifdef __STRICT_ANSI__ |
| 15:55:16 | mjn3 | defined |
| 15:55:18 | mjn3 | #endif |
| 15:55:20 | mjn3 | use posix is __USE_POSIX |
| 15:55:33 | sjhill | that's C code? |
| 15:56:09 | mjn3 | well, yes but don't expect it to compile. just run it through the preprocessor.. gcc -E tfeatures.c |
| 15:56:40 | mjn3 | i generally pipe it through grep -v "^ *$" to kill all the blank lines |
| 15:57:53 | mjn3 | after all the include messages, i get: |
| 15:57:56 | mjn3 | posix source is 1 |
| 15:57:56 | mjn3 | posix c source is 199506L |
| 15:57:56 | mjn3 | xopen source is _XOPEN_SOURCE |
| 15:57:56 | mjn3 | strict ansi is __STRICT_ANSI__ |
| 15:57:56 | mjn3 | use posix is 1 |
| 15:58:18 | sjhill | yup, so do i |
| 15:58:27 | sjhill | i added 'limits.h' to your stuff and get: |
| 15:58:36 | sjhill | # 10 "tfeatures.c" 2 |
| 15:58:36 | sjhill | # 1 "/opt/toolchains/uclibc/lib/gcc-lib/mipsel-linux/3.2/include/limits.h" 1 3 |
| 15:58:36 | sjhill | # 11 "tfeatures.c" 2 |
| 15:58:51 | sjhill | that's the whole problem...imho...it's using GCC's stuff first which screws me |
| 16:01:02 | mjn3 | that's odd, since it is supposed to include the gcc stuff too. let me check something... |
| 16:03:03 | mjn3 | ok, try this one |
| 16:03:08 | mjn3 | #include <features.h> |
| 16:03:08 | mjn3 | hi: use posix is __USE_POSIX |
| 16:03:08 | mjn3 | #include <limits.h> |
| 16:03:08 | mjn3 | hi: use posix is __USE_POSIX |
| 16:03:08 | mjn3 | hi: posix path max is _POSIX_PATH_MAX |
| 16:03:39 | mjn3 | then gcc -E tlimits2.c | grep "^hi" gives me |
| 16:03:54 | mjn3 | hi: use posix is 1 |
| 16:03:54 | mjn3 | hi: use posix is 1 |
| 16:03:54 | mjn3 | hi: posix path max is 256 |
| 16:05:16 | mjn3 | gcc -ansi -E tlimits2.c | grep "^hi" |
| 16:05:16 | mjn3 | hi: use posix is __USE_POSIX |
| 16:05:17 | mjn3 | hi: use posix is __USE_POSIX |
| 16:05:17 | mjn3 | hi: posix path max is _POSIX_PATH_MAX |
| 16:06:57 | sjhill | yup, i get that |
| 16:07:17 | sjhill | with my mipsel cross compiler |
| 16:08:08 | sjhill | show me your 'limits.h' line in the output |
| 16:10:06 | mjn3 | here's all the output |
| 16:10:17 | mjn3 | # 1 "tlimits2.c" |
| 16:10:17 | mjn3 | # 1 "<built-in>" |
| 16:10:17 | mjn3 | # 1 "<command line>" |
| 16:10:17 | mjn3 | # 1 "tlimits2.c" |
| 16:10:17 | mjn3 | # 1 "/archive/work/toolchain/gcc-3.2/toolchain-i386/usr/lib/gcc-lib/../../i386-linux/sys-include/features.h" 1 3 |
| 16:10:18 | mjn3 | # 301 "/archive/work/toolchain/gcc-3.2/toolchain-i386/usr/lib/gcc-lib/../../i386-linux/sys-include/features.h" 3 |
| 16:10:21 | mjn3 | # 1 "/archive/work/toolchain/gcc-3.2/toolchain-i386/usr/lib/gcc-lib/../../i386-linux/sys-include/sys/cdefs.h" 1 3 |
| 16:10:24 | mjn3 | # 302 "/archive/work/toolchain/gcc-3.2/toolchain-i386/usr/lib/gcc-lib/../../i386-linux/sys-include/features.h" 2 3 |
| 16:10:27 | mjn3 | # 336 "/archive/work/toolchain/gcc-3.2/toolchain-i386/usr/lib/gcc-lib/../../i386-linux/sys-include/features.h" 3 |
| 16:10:31 | mjn3 | # 1 "/archive/work/toolchain/gcc-3.2/toolchain-i386/usr/lib/gcc-lib/../../i386-linux/sys-include/bits/uClibc_config.h" 1 3 |
| 16:10:34 | mjn3 | # 337 "/archive/work/toolchain/gcc-3.2/toolchain-i386/usr/lib/gcc-lib/../../i386-linux/sys-include/features.h" 2 3 |
| 16:10:37 | mjn3 | # 2 "tlimits2.c" 2 |
| 16:10:40 | mjn3 | hi: use posix is 1 |
| 16:10:42 | mjn3 | # 1 "/archive/work/toolchain/gcc-3.2/toolchain-i386/usr/lib/gcc-lib/i386-linux/3.2/include/limits.h" 1 3 |
| 16:10:44 | mjn3 | # 11 "/archive/work/toolchain/gcc-3.2/toolchain-i386/usr/lib/gcc-lib/i386-linux/3.2/include/limits.h" 3 |
| 16:10:46 | mjn3 | # 1 "/archive/work/toolchain/gcc-3.2/toolchain-i386/usr/lib/gcc-lib/i386-linux/3.2/include/syslimits.h" 1 3 |
| 16:10:48 | mjn3 | # 1 "/archive/work/toolchain/gcc-3.2/toolchain-i386/usr/lib/gcc-lib/i386-linux/3.2/include/limits.h" 1 3 |
| 16:10:50 | mjn3 | # 132 "/archive/work/toolchain/gcc-3.2/toolchain-i386/usr/lib/gcc-lib/i386-linux/3.2/include/limits.h" 3 |
| 16:10:52 | mjn3 | # 1 "/archive/work/toolchain/gcc-3.2/toolchain-i386/usr/lib/gcc-lib/../../i386-linux/sys-include/limits.h" 1 3 |
| 16:10:55 | mjn3 | # 144 "/archive/work/toolchain/gcc-3.2/toolchain-i386/usr/lib/gcc-lib/../../i386-linux/sys-include/limits.h" 3 |
| 16:10:59 | mjn3 | # 1 "/archive/work/toolchain/gcc-3.2/toolchain-i386/usr/lib/gcc-lib/../../i386-linux/sys-include/bits/posix1_lim.h" 1 3 |
| 16:11:02 | mjn3 | # 126 "/archive/work/toolchain/gcc-3.2/toolchain-i386/usr/lib/gcc-lib/../../i386-linux/sys-include/bits/posix1_lim.h" 3 |
| 16:11:04 | mjn3 | # 1 "/archive/work/toolchain/gcc-3.2/toolchain-i386/usr/lib/gcc-lib/../../i386-linux/sys-include/bits/local_lim.h" 1 3 |
| 16:11:08 | mjn3 | # 36 "/archive/work/too |
| 16:11:13 | mjn3 | (blasted pasting limitation) |
| 16:11:17 | mjn3 | # 36 "/archive/work/toolchain/gcc-3.2/toolchain-i386/usr/lib/gcc-lib/../../i386-linux/sys-include/bits/local_lim.h" 3 |
| 16:11:17 | mjn3 | # 1 "/archive/work/toolchain/gcc-3.2/toolchain-i386/usr/lib/gcc-lib/../../i386-linux/sys-include/linux/limits.h" 1 3 |
| 16:11:19 | mjn3 | # 37 "/archive/work/toolchain/gcc-3.2/toolchain-i386/usr/lib/gcc-lib/../../i386-linux/sys-include/bits/local_lim.h" 2 3 |
| 16:11:22 | mjn3 | # 127 "/archive/work/toolchain/gcc-3.2/toolchain-i386/usr/lib/gcc-lib/../../i386-linux/sys-include/bits/posix1_lim.h" 2 3 |
| 16:11:26 | mjn3 | # 145 "/archive/work/toolchain/gcc-3.2/toolchain-i386/usr/lib/gcc-lib/../../i386-linux/sys-include/limits.h" 2 3 |
| 16:11:28 | mjn3 | # 1 "/archive/work/toolchain/gcc-3.2/toolchain-i386/usr/lib/gcc-lib/../../i386-linux/sys-include/bits/posix2_lim.h" 1 3 |
| 16:11:31 | mjn3 | # 149 "/archive/work/toolchain/gcc-3.2/toolchain-i386/usr/lib/gcc-lib/../../i386-linux/sys-include/limits.h" 2 3 |
| 16:11:34 | mjn3 | # 133 "/archive/work/toolchain/gcc-3.2/toolchain-i386/usr/lib/gcc-lib/i386-linux/3.2/include/limits.h" 2 3 |
| 16:11:36 | mjn3 | # 8 "/archive/work/toolchain/gcc-3.2/toolchain-i386/usr/lib/gcc-lib/i386-linux/3.2/include/syslimits.h" 2 3 |
| 16:11:40 | mjn3 | # 12 "/archive/work/toolchain/gcc-3.2/toolchain-i386/usr/lib/gcc-lib/i386-linux/3.2/include/limits.h" 2 3 |
| 16:11:42 | mjn3 | # 4 "tlimits2.c" 2 |
| 16:11:44 | mjn3 | hi: use posix is 1 |
| 16:11:46 | mjn3 | hi: posix path max is 256 |
| 16:11:49 | mjn3 | remove the incomplete line and paste those together. ;-) |
| 16:12:15 | sjhill | hmm |
| 16:12:36 | sjhill | let me build the uclibc wrapped compiler and see what happens |
| 16:13:15 | mjn3 | really, i'd try putting some dummy output lines to test the value of __USE_POSIX before and after the include_next in limits.h. maybe include_next is broken for you... |
| 16:13:43 | sjhill | ok, be patient... |
| 16:13:47 | sjhill | ummm, how do i do that? |
| 16:13:50 | mjn3 | or maybe the file it is including is resetting __USE_POSIX. |
| 16:14:16 | sjhill | the problem is that the compiler's GCC 'limits.h' doesn't include the next 'limits.h' |
| 16:15:18 | mjn3 | hmm |
| 16:15:48 | sjhill | for your ARM native uclibc toolchain, could you 'grep #include' GCC's 'limits.h' |
| 16:16:10 | mjn3 | re the dummy output lines, just like we've been doing with these examples. you could just add some "hi: ..." lines in limits.h and then grep the prepocessor output |
| 16:16:27 | mjn3 | a sec |
| 16:18:30 | mjn3 | mjn3@mars:/archive/work/toolchain/gcc-3.2/toolchain-arm/lib/gcc-lib/arm-linux/3.2/include$ pwd |
| 16:18:30 | mjn3 | mjn3@mars:/archive/work/toolchain/gcc-3.2/toolchain-arm/lib/gcc-lib/arm-linux/3.2/include$ grep include limits.h |
| 16:18:30 | mjn3 | #include "syslimits.h" |
| 16:18:30 | mjn3 | #include_next <limits.h> /* recurse down to the real one */ |
| 16:18:56 | sjhill | bingo! |
| 16:19:02 | sjhill | i don't have those lines! |
| 16:19:30 | sjhill | none of them! |
| 16:19:34 | sjhill | that's why things aren't working |
| 16:19:43 | sjhill | now to figure out how those header files are generated |
| 16:19:54 | mjn3 | tail limits.h |
| 16:19:54 | mjn3 | if the system has its own version of limits.h. */ |
| 16:19:54 | mjn3 | #else /* not _GCC_LIMITS_H_ */ |
| 16:19:55 | mjn3 | #ifdef _GCC_NEXT_LIMITS_H |
| 16:19:55 | mjn3 | #include_next <limits.h> /* recurse down to the real one */ |
| 16:19:57 | mjn3 | #endif |
| 16:20:00 | mjn3 | #endif /* not _GCC_LIMITS_H_ */ |
| 16:22:49 | sjhill | [root@lab-dvt-01 include]# tail limits.h |
| 16:22:49 | sjhill | #define LONG_LONG_MIN (-LONG_LONG_MAX-1) |
| 16:22:49 | sjhill | #undef LONG_LONG_MAX |
| 16:22:49 | sjhill | #define LONG_LONG_MAX __LONG_LONG_MAX__ |
| 16:22:50 | sjhill | #undef ULONG_LONG_MAX |
| 16:22:51 | sjhill | #define ULONG_LONG_MAX (LONG_LONG_MAX * 2ULL + 1) |
| 16:22:53 | sjhill | #endif |
| 16:22:58 | sjhill | #endif /* _LIMITS_H___ */ |
| 16:23:08 | sjhill | not even close |
| 16:23:22 | sjhill | something is not right with the native mips toolchain |
| 16:24:12 | mjn3 | there's a comment at the top of the file -- This administrivia gets added to the beginning of limits.h |
| 16:24:12 | mjn3 | if the system has its own version of limits.h. |
| 16:26:31 | sjhill | what's in your 'syslimits.h'? |
| 16:27:42 | mjn3 | besides a starting comment: |
| 16:27:45 | mjn3 | #define _GCC_NEXT_LIMITS_H /* tell gcc's limits.h to recurse */ |
| 16:27:45 | mjn3 | #include_next <limits.h> |
| 16:27:45 | mjn3 | #undef _GCC_NEXT_LIMITS_H |
| 16:28:01 | mjn3 | that's it... |
| 16:28:22 | sjhill | ok, that matches |
| 16:42:21 | sjhill | just for grins, i copied the 'limits.h' from my PC's x86 gcc directory and used it....all my errors disappeared |
| 16:43:23 | sjhill | i'm building my toolchain wrong obviously |
| 16:49:21 | mjn3 | hmm... sorry to hear that. not my area so can't really help you there. i just grabbed the toolchain stuff erik put up and changed it to use gcc 3.2 and binutils 2.12.1. i think it was set up for gcc 3.1.1 and binutils 2.13 but the 2.13 was buggy |
| 16:57:58 | mjn3 | andersee: morning/afternoon/wakeful-time ;-) |
| 17:10:07 | andersee | morning |
| 17:11:24 | sjhill | hey andersee |
| 17:13:15 | mjn3 | andersee: i've been looking at the timezone situation... i'm still not seeing why setting TZ in /etc/profile is insufficient. seems like it is a pretty common approach (or at least was) |
| 17:15:47 | mjn3 | andersee: in at least on unix, init would actually setup env variable for its children from /etc/default/init. in particular it would set TZ, LC_*, and LANG |
| 17:17:33 | andersee | sjhill: morning |
| 17:18:20 | andersee | mjn3: the main reason /etc/profile wasn't working for that one dude was he was on uClinux using the 'sash' shell. Turns out that sash doesn't parse /etc/profile. |
| 17:19:28 | mjn3 | andersee: seems like it would be better to fix sash... :-( |
| 17:21:02 | andersee | hehe |
| 17:21:04 | andersee | Perhaps |
| 17:21:34 | sjhill | andersee: how come you don't have the option '--enable-threads' in your uclibc toolchain building Makefile? |
| 17:23:44 | andersee | sjhill: That config script needs some major updating... |
| 17:24:08 | andersee | sjhill: But its about to need even more major changes.... |
| 17:24:09 | andersee | :-) |
| 17:24:18 | sjhill | how's come? |
| 17:24:23 | sjhill | i18n stuff? |
| 17:24:44 | andersee | sjhill: I'm reworking the config system. |
| 17:24:58 | andersee | sjhill: manuel's been bugging me about it for months.... |
| 17:25:14 | mjn3 | yep... that and profiling support. ;-) |
| 17:25:24 | andersee | sjhill: The current config system is far from elegant. |
| 17:26:13 | sjhill | yeah, it pretty much sucks rocks |
| 17:26:18 | sjhill | just kidding :) |
| 17:29:40 | andersee | The new config system is based on CML1 (like the linux kernel uses) |
| 17:30:09 | andersee | So you will be able to just run 'make oldconfig' to update your config settings. |
| 17:31:12 | sjhill | cool |
| 17:31:23 | sjhill | similar to what was done with busybox |
| 17:32:49 | andersee | yup |
| 18:14:01 | sjhill | mjn3: fixed |
| 18:14:39 | sjhill | it was a problem with my toolchain building...look at this nice little line in 'gcc-3.2/gcc/configure' script: |
| 18:14:59 | sjhill | if [ -f /opt/toolchains/uclibc/mipsel-linux/sys-include/limits.h ] ; then \ |
| 18:14:59 | sjhill | cat ../../gcc-3.2/gcc/limitx.h ../../gcc-3.2/gcc/glimits.h ../../gcc-3.2/gcc/limity.h > tmp-xlimits.h; \ |
| 18:14:59 | sjhill | else \ |
| 18:14:59 | sjhill | cat ../../gcc-3.2/gcc/glimits.h > tmp-xlimits.h; \ |
| 18:14:59 | sjhill | fi |
| 18:15:02 | sjhill | /bin/sh ../../gcc-3.2/gcc/move-if-change tmp-specs.h specs.h |
| 18:15:03 | sjhill | echo timestamp > s-options |
| 18:15:05 | sjhill | mv tmp-xlimits.h xlimits.h |
| 18:15:08 | sjhill | echo timestamp > s-specs |
| 18:15:36 | sjhill | if you don't havethe 'sys-include' symbolic link to your 'include' directory, it doesn't create the GCC limits.h header correctly |
| 18:15:44 | sjhill | *gaaah* |
| 18:15:59 | sjhill | now LTP compiles properly with the native uClibc toolchain on MIPS |
| 18:16:07 | mjn3 | congrats on finding it! |
| 18:16:11 | sjhill | thx :) |
| 18:26:19 | mjn3 | i'm heading off to run a few errands... should be back in about an hour or so |
| 18:39:32 | sjhill | andersee: do you have a schedule for the 0.9.16 release? |
| 18:52:33 | andersee | sjhill: not yet |
| 18:53:00 | sjhill | good...then i can safely release my 0.9.15 toolchain RPMS... :) |
| 18:54:16 | andersee | yup |
| 18:55:09 | andersee | sjhill: you have the bandwidth? Want me to put em on uclibc.org somewhere? |
| 18:55:38 | sjhill | andersee: i'm fine, i still have 4.5GB/month that i don't even use...thx though |
| 18:56:38 | andersee | sure, no prob |
| 18:57:33 | sjhill | LTP is a great way to find uClibc problems :) |
| 19:01:22 | andersee | sjhill: find many things to fix? |
| 19:01:57 | sjhill | i think i'm done for now...LMBench also compiles against uClibc with no changes |
| 19:02:13 | sjhill | i'll be starting benchmarking/torture testing in a couple of days |
| 19:02:45 | sjhill | everytime i work on this stuff, i'm more impressed how complicated toolchain development is |
| 19:03:30 | andersee | I wonder if all arches define some sortof "__mips_soft_float" like thing. uClibc's soft-float support kindof sucks at the moment. |
| 19:05:15 | sjhill | ARM wouldn't currently...no production ARM/StronARM has HW FP |
| 19:06:15 | andersee | right. |
| 19:06:17 | andersee | But.... |
| 19:06:21 | andersee | If you look in libc/sysdeps/linux/arm/__longjmp.S |
| 19:06:38 | andersee | I do a lfmfd f4, 4, [ip] ! /* load the floating point regs */ |
| 19:07:02 | andersee | and I do it unconditionally if __UCLIBC_HAS_FLOATS__ is enabled |
| 19:07:14 | andersee | Relying on the kerenl FPU emulator... |
| 19:07:48 | andersee | I suppose I should check if there is a "__arm_soft_float" type #define |
| 19:08:16 | andersee | tests for such a thing on winder |
| 19:09:02 | sjhill | that's why the patch was put in...the guy i got the patch from wanted to avoid starting up the kernel FP emulator |
| 19:09:13 | sjhill | if soft float was enabled |
| 19:09:19 | andersee | yup |
| 19:09:34 | sjhill | yeah, it might be cool to have uClibc support that a bit better |
| 19:09:58 | andersee | Thats also why I'm checking for such a #define on winder.... I'd never thought there was a #define I could check... |
| 19:52:22 | andersee | sjhill: Cool, looks like I can check for "__SOFTFP__" on arm. |
| 19:52:31 | andersee | fixes arm soft-float support |
| 19:52:52 | sjhill | sweet |