Subject: Re: iconv problems after update?
To: Greg Troxel <>
From: Takehiko NOZAKI <>
List: current-users
Date: 03/17/2007 18:12:57
hi, all

> CPPPICFLAGS seems used only to compile .so from *.s files.
> I guess we should use CPICFLAGS instead even for cpp(1) flags
> on compiling .so files. (it already contains -DPIC)

thanks a lot. i had committed it now.

please everyone use src/lib/libc/Makefile#rev1.129
(don't forget cvs update -A option to remove sticky).

$ cd ${BSDSRCDIR}/lib/libc
$ cvs update -A Makefile
$ make clean depend all install

> The CSHLIBFLAGS was added by yamt@ in 2002, but matt@ recently changed
> to PICFLAGS to avoid some other lossage, so reverting the change
> doesn't seem wonderful.

i think this is only cosmetic change, reverting to rev1.127 may no harm.

> Are you saying that the patch you posted
> results in a working libc with iconv?  I don't understand the maze of
> twisty preprocessor flags, all alike.

yes, it works.

some *.c sources(src/lib/libc/citrus/citrus_module.c etc.) call
dlopen(3) to load the encoding module(/usr/lib/i18n/ and so on).

but there is the restriction that, dlopen(3) doesn't work for
static linked binaries(because they are non-PIC objects).
we don't want call it(it's useless), and we done it
(#ifdef __PIC__ is also usable, but the pre-defined macro is peculiar to gcc).

but cosmetic change CSHLIBFLAGS -> CPPPICFLAGS done in rev1.127 is not corrent,
CPPPICFLAGS affect *.s(asembler) sources only. we want it for *.c sources.
so tsutsui-san suggest to use CPICFLAGS.

very truly yours.
Takehiko NOZAKI <>