filesystem patch?

Farkas Levente lfarkas at lfarkas.org
Mon Dec 15 23:42:25 UTC 2008


Richard W.M. Jones wrote:
> On Mon, Dec 15, 2008 at 11:23:36PM +0100, Farkas Levente wrote:
>> Richard W.M. Jones wrote:
>>> I added this patch, except that I removed mingw32-make.  This command
>>> didn't expand %{name}, %{version} etc. in the make parameters.  In
>>> fact, this command can never work because correct values for these
>>> parameters cannot be known by an independently running mingw32-make
>>> command.
>> i don't really understand this. i don't use name and version in the make
>> macro [...]
> 
> %{name} and %{version} are used indirectly in various circumstances.
> A common case is where you're using a buildroot under your home
> directory.  In my case %{_mingw32_make} expands to:
> 
> $ rpm --eval '%{_mingw32_make}'
> HOST_CC=gcc; export HOST_CC; 
> [...]
>   make \
>   prefix=/home/rjones/rpmbuild/BUILDROOT/%{name}-%{version}-%{release}.x86_64/usr/i686-pc-mingw32/sys-root/mingw \
>   exec_prefix=/home/rjones/rpmbuild/BUILDROOT/%{name}-%{version}-%{release}.x86_64/usr/i686-pc-mingw32/sys-root/mingw \
> [...]
> 
> (This overriding of buildroots with stuff based on %_topdir was only
> added to rpm or Fedora's configuration of rpm relatively recently).

that's sucks:-(
on centos-5 it expand to working thing.
i will rewrite it to something working version.

# rpm --eval '%{_mingw32_make}'
HOST_CC=gcc; export HOST_CC;
  PKG_CONFIG_PATH="/usr/i686-pc-mingw32/sys-root/mingw/lib/pkgconfig";
export PKG_CONFIG_PATH;
  CC="${MINGW32_CC:-i686-pc-mingw32-gcc}"; export CC;
  CXX="${MINGW32_CXX:-i686-pc-mingw32-g++}"; export CXX;
  CFLAGS="${MINGW32_CFLAGS:--O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2
-fexceptions --param=ssp-buffer-size=4 -mms-bitfields}"; export CFLAGS;
  CXXFLAGS="${MINGW32_CXXFLAGS:--O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4
-mms-bitfields}"; export CXXFLAGS;
  _PREFIX="/usr/bin/i686-pc-mingw32-";
  for i in `ls ${_PREFIX}*|egrep -v "gcc-"`; do
    x=`echo $i|sed "s,${_PREFIX},,"|tr "a-z+-" "A-ZX_"`;
    declare -x $x="$i" ; export $x;
  done;
  unset _PREFIX;
  for i in `ls /usr/i686-pc-mingw32/sys-root/mingw/bin/*|grep --
"-config$"` ; do
    x=`basename $i|tr "a-z+-" "A-ZX_"`;
    declare -x $x="$i" ; export $x;
  done;
  unset x i ;
  make \
	prefix=/usr/i686-pc-mingw32/sys-root/mingw \
	exec_prefix=/usr/i686-pc-mingw32/sys-root/mingw \
	bindir=/usr/i686-pc-mingw32/sys-root/mingw/bin \
	sbindir=/usr/i686-pc-mingw32/sys-root/mingw/sbin \
	sysconfdir=/usr/i686-pc-mingw32/sys-root/mingw/etc \
	datadir=/usr/i686-pc-mingw32/sys-root/mingw/share \
	includedir=/usr/i686-pc-mingw32/sys-root/mingw/include \
	libdir=/usr/i686-pc-mingw32/sys-root/mingw/lib \
	libexecdir=/usr/i686-pc-mingw32/sys-root/mingw/libexec \
	localstatedir=/usr/i686-pc-mingw32/sys-root/mingw/var \
	sharedstatedir=/usr/i686-pc-mingw32/sys-root/mingw/com \
	mandir=/usr/i686-pc-mingw32/sys-root/mingw/share/man \
	infodir=/usr/i686-pc-mingw32/sys-root/mingw/share/info



-- 
  Levente                               "Si vis pacem para bellum!"



More information about the mingw mailing list