From 03bb2914eabf0d4ae7fcd59da272db326969288a Mon Sep 17 00:00:00 2001 From: Elliot Lee Date: Wed, 12 Jun 2002 12:59:50 +0000 Subject: [PATCH 001/213] Initial revision --- brp-compress | 56 +++++++++++ brp-redhat | 13 +++ brp-sparc64-linux | 41 ++++++++ brp-strip | 12 +++ brp-strip-comment-note | 17 ++++ brp-strip-shared | 17 ++++ find-lang.sh | 95 +++++++++++++++++ find-provides | 61 +++++++++++ find-requires | 133 ++++++++++++++++++++++++ macros | 115 +++++++++++++++++++++ perl.prov | 180 +++++++++++++++++++++++++++++++++ perl.req | 224 +++++++++++++++++++++++++++++++++++++++++ rpmrc | 1 + 13 files changed, 965 insertions(+) create mode 100755 brp-compress create mode 100755 brp-redhat create mode 100755 brp-sparc64-linux create mode 100755 brp-strip create mode 100755 brp-strip-comment-note create mode 100755 brp-strip-shared create mode 100755 find-lang.sh create mode 100755 find-provides create mode 100755 find-requires create mode 100644 macros create mode 100755 perl.prov create mode 100755 perl.req create mode 100644 rpmrc diff --git a/brp-compress b/brp-compress new file mode 100755 index 0000000..897a765 --- /dev/null +++ b/brp-compress @@ -0,0 +1,56 @@ +#!/bin/sh + +# If using normal root, avoid changing anything. +if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ]; then + exit 0 +fi + +cd $RPM_BUILD_ROOT + +# Compress man pages +COMPRESS="gzip -9" +COMPRESS_EXT=.gz + +for d in ./usr/man/man* ./usr/man/*/man* ./usr/info \ + ./usr/share/man/man* ./usr/share/man/*/man* ./usr/share/info \ + ./usr/kerberos/man ./usr/X11R6/man/man* ./usr/lib/perl5/man/man* \ + ./usr/share/doc/*/man/man* ./usr/lib/*/man/man* +do + [ -d $d ] || continue + for f in `find $d -type f` + do + [ -f "$f" ] || continue + [ "`basename $f`" = "dir" ] && continue + + case "$f" in + *.Z) gunzip $f; b=`echo $f | sed -e 's/\.Z$//'`;; + *.gz) gunzip $f; b=`echo $f | sed -e 's/\.gz$//'`;; + *.bz2) bunzip2 $f; b=`echo $f | sed -e 's/\.bz2$//'`;; + *) b=$f;; + esac + + $COMPRESS $b /dev/null || { + inode=`ls -i $b | awk '{ print $1 }'` + others=`find $d -type f -inum $inode` + if [ -n "$others" ]; then + for afile in $others ; do + [ "$afile" != "$b" ] && rm -f $afile + done + $COMPRESS -f $b + for afile in $others ; do + [ "$afile" != "$b" ] && ln $b$COMPRESS_EXT $afile$COMPRESS_EXT + done + else + $COMPRESS -f $b + fi + } + done + + for f in `find $d -type l` + do + l=`ls -l $f | sed -e 's/.* -> //' -e 's/\.gz$//' -e 's/\.bz2$//' -e 's/\.Z$//'` + rm -f $f + b=`echo $f | sed -e 's/\.gz$//' -e 's/\.bz2$//' -e 's/\.Z$//'` + ln -sf $l$COMPRESS_EXT $b$COMPRESS_EXT + done +done diff --git a/brp-redhat b/brp-redhat new file mode 100755 index 0000000..bdd5048 --- /dev/null +++ b/brp-redhat @@ -0,0 +1,13 @@ +#!/bin/sh + +# These are the build root policies that Red Hat invokes at the end +# of the %install scriptlet. + +# Compress man pages (Red Hat uses GNU gzip) +/usr/lib/rpm/redhat/brp-compress + +# Strip ELF binaries (Red Hat uses GNU binutils). +/usr/lib/rpm/redhat/brp-strip + +# Strip even more sections (Red Hat uses GNU binutils). +/usr/lib/rpm/redhat/brp-strip-comment-note diff --git a/brp-sparc64-linux b/brp-sparc64-linux new file mode 100755 index 0000000..5e511b3 --- /dev/null +++ b/brp-sparc64-linux @@ -0,0 +1,41 @@ +#!/bin/sh +# If using normal root, avoid changing anything. +if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ]; then + exit 0 +fi +files= +LC_ALL= +LANG= + +# Move 64bit ELF objects from /lib, /usr/lib, /usr/X11R6/lib to */lib64 +# directories + +for f in `find $RPM_BUILD_ROOT{,/usr,/usr/X11R6}/lib -maxdepth 1 -type f -o -type l 2>/dev/null`; do + ff=$f + while [ -L $ff ]; do + l=`ls -l $ff | awk '{ print $11 }'` + case $l in + /*) ff=$RPM_BUILD_ROOT$l ;; + *) ff=`dirname $ff`/$l ;; + esac + done + if file $ff 2>/dev/null | grep ': ELF 64-bit .SB' | grep -v ': ELF 64-bit .SB executable' > /dev/null; then + files="$files $f" + elif file $ff 2>/dev/null | grep 'ar archive' > /dev/null; then + if objdump -h $ff 2>/dev/null | grep ':[ ]*file format elf64-sparc' > /dev/null; then + files="$files $f" + fi + fi +done +for f in $files; do + d=`dirname $f` + n=`basename $f` + if [ ! -d ${d}64 ]; then mkdir -p ${d}64; fi + if [ -L $f ]; then + l=`ls -l $f | awk '{ print $11 }' | sed 's_lib\(/[^/]*\)$_lib64\1_'` + ln -sf $l ${d}64/$n + rm -f $f + else + mv -f $f ${d}64/$n + fi +done diff --git a/brp-strip b/brp-strip new file mode 100755 index 0000000..f959134 --- /dev/null +++ b/brp-strip @@ -0,0 +1,12 @@ +#!/bin/sh +# If using normal root, avoid changing anything. +if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ]; then + exit 0 +fi + +# Strip ELF binaries +for f in `find $RPM_BUILD_ROOT -type f \( -perm -0100 -or -perm -0010 -or -perm -0001 \) -exec file {} \; | \ + grep -v ' shared object,' | \ + sed -n -e 's/^\(.*\):[ ]*ELF.*, not stripped/\1/p'`; do + strip -g $f || : +done diff --git a/brp-strip-comment-note b/brp-strip-comment-note new file mode 100755 index 0000000..1c853cf --- /dev/null +++ b/brp-strip-comment-note @@ -0,0 +1,17 @@ +#!/bin/sh +# If using normal root, avoid changing anything. +if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ]; then + exit 0 +fi + +# Strip .comment and .note sections (the latter only if it is not allocated) +# for already stripped elf files in the build root +for f in `find $RPM_BUILD_ROOT -type f \( -perm -0100 -or -perm -0010 -or -perm -0001 \) -exec file {} \; | \ + sed -n -e 's/^\(.*\):[ ]*ELF.*, stripped/\1/p'`; do + note="-R .note" + if objdump -h $f | grep '^[ ]*[0-9]*[ ]*.note[ ]' -A 1 | \ + grep ALLOC >/dev/null; then + note= + fi + strip -R .comment $note $f || : +done diff --git a/brp-strip-shared b/brp-strip-shared new file mode 100755 index 0000000..501a278 --- /dev/null +++ b/brp-strip-shared @@ -0,0 +1,17 @@ +#!/bin/sh +# Conectiva brp - strip shared libraries. Based on Red Hat's brp-strip. +# Thu Apr 20 - Guilherme Manika +# Created file + +if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ]; then + exit 0 +fi + +# Strip ELF shared objects +# Please note we don't restrict our search to executable files because +# our libraries are not (should not be, at least) +x. +for f in `find $RPM_BUILD_ROOT -type f -a -exec file {} \; | \ + grep ' shared object,' | \ + sed -n -e 's/^\(.*\):[ ]*ELF.*, not stripped/\1/p'`; do + strip --strip-unneeded $f +done diff --git a/find-lang.sh b/find-lang.sh new file mode 100755 index 0000000..d333e48 --- /dev/null +++ b/find-lang.sh @@ -0,0 +1,95 @@ +#!/bin/sh +#findlang - automagically generate list of language specific files +#for inclusion in an rpm spec file. +#This does assume that the *.mo files are under .../share/locale/... +#Run with no arguments gets a usage message. + +#findlang is copyright (c) 1998 by W. L. Estes + +#Redistribution and use of this software are hereby permitted for any +#purpose as long as this notice and the above copyright notice remain +#in tact and are included with any redistribution of this file or any +#work based on this file. + +#changes: +# 1999-10-19 Artur Frysiak +# * added support for GNOME help files +# * start support for KDE help files + +usage () { +cat <&2 +elif [ ! -d $1 ] ; then + echo $0: $1: no such directory + exit 1 +else TOP_DIR="`echo $1|sed -e 's:/$::'`" +fi +shift + +if [ -z "$1" ] ; then usage +else NAME=$1 +fi +shift + +GNOME=# +KDE=# +MO= +MO_NAME=$NAME.lang + +while test $# -gt 0 ; do + case "${1}" in + --with-gnome ) + GNOME= + shift + ;; + --with-kde ) + KDE_HELP= + shift + ;; + --without-mo ) + MO=# + shift + ;; + * ) + MO_NAME=${1} + shift + ;; + esac +done + +find $TOP_DIR -type f|sed ' +1i\ +%defattr (644, root, root, 755) +s:'"$TOP_DIR"':: +'"$MO"'s:\(.*/share/locale/\)\([^/_]\+\)\(.*'"$NAME"'\.mo$\):%lang(\2) \1\2\3: +'"$GNOME"'s:\(.*/gnome/help/'"$NAME"'/\)\([^/_]\+\):%lang(\2) \1\2: +s:^\([^%].*\):: +s:%lang(C) :: +' > $MO_NAME + +find $TOP_DIR -type d|sed ' +s:'"$TOP_DIR"':: +'"$GNOME"'s:\(.*/gnome/help/'"$NAME"'$\):%dir \1: +'"$GNOME"'s:\(.*/gnome/help/'"$NAME"'/\)\([^/_]\+\):%dir %lang(\2) \1\2: +s:^\([^%].*\):: +s:%lang(C) :: +' >> $MO_NAME diff --git a/find-provides b/find-provides new file mode 100755 index 0000000..2743a08 --- /dev/null +++ b/find-provides @@ -0,0 +1,61 @@ +#!/bin/bash + +# This script reads filenames from STDIN and outputs any relevant provides +# information that needs to be included in the package. + +filelist=`sed "s/['\"]/\\\&/g"` + +solist=$(echo $filelist | grep "\\.so" | grep -v "^/lib/ld.so" | \ + xargs file -L 2>/dev/null | grep "ELF.*shared object" | cut -d: -f1) +pythonlist= +tcllist= + +# +# --- Alpha does not mark 64bit dependencies +case `uname -m` in + alpha*) mark64="" ;; + *) mark64="()(64bit)" ;; +esac + +# +# --- Library sonames and weak symbol versions (from glibc). +for f in $solist; do + soname=$(objdump -p $f | awk '/SONAME/ {print $2}') + + lib64=`if file -L $f 2>/dev/null | \ + grep "ELF 64-bit" >/dev/null; then echo "$mark64"; fi` + if [ "$soname" != "" ]; then + if [ ! -L $f ]; then + echo $soname$lib64 + objdump -p $f | awk ' + BEGIN { START=0 ; } + /Version definitions:/ { START=1; } + /^[0-9]/ && (START==1) { print $4; } + /^$/ { START=0; } + ' | \ + grep -v $soname | \ + while read symbol ; do + echo "$soname($symbol)`echo $lib64 | sed 's/()//'`" + done + fi + else + echo ${f##*/}$lib64 + fi +done | sort -u + +# +# --- Perl modules. +[ -x /usr/lib/rpm/redhat/perl.prov ] && + echo $filelist | tr '[:blank:]' \\n | grep '\.pm$' | /usr/lib/rpm/redhat/perl.prov | sort -u + +# +# --- Python modules. +[ -x /usr/lib/rpm/redhat/python.prov -a -n "$pythonlist" ] && + echo $pythonlist | tr '[:blank:]' \\n | /usr/lib/rpm/redhat/python.prov | sort -u + +# +# --- Tcl modules. +[ -x /usr/lib/rpm/redhat/tcl.prov -a -n "$tcllist" ] && + echo $tcllist | tr '[:blank:]' \\n | /usr/lib/rpm/redhat/tcl.prov | sort -u + +exit 0 diff --git a/find-requires b/find-requires new file mode 100755 index 0000000..c3dade5 --- /dev/null +++ b/find-requires @@ -0,0 +1,133 @@ +#!/bin/bash + +# +# Auto-generate requirements for executables (both ELF and a.out) and library +# sonames, script interpreters, and perl modules. +# + +ulimit -c 0 + +# +# --- Set needed to 0 for traditional find-requires behavior. +needed=1 +if [ X"$1" = Xldd ]; then + needed=0 +elif [ X"$1" = Xobjdump ]; then + needed=1 +fi + +# +# --- Grab the file manifest and classify files. +filelist=`sed "s/['\"]/\\\&/g"` +exelist=`echo $filelist | xargs -r file | egrep -v ":.* (commands|script) " | \ + grep ":.*executable" | cut -d: -f1` +scriptlist=`echo $filelist | xargs -r file | \ + egrep ":.* (commands|script) " | cut -d: -f1` +liblist=`echo $filelist | xargs -r file | \ + grep ":.*shared object" | cut -d : -f1` + +interplist= +perllist= +pythonlist= +tcllist= + +# +# --- Alpha does not mark 64bit dependencies +case `uname -m` in + alpha*) mark64="" ;; + *) mark64="()(64bit)" ;; +esac + +if [ "$needed" -eq 0 ]; then +# +# --- Executable dependency sonames. + for f in $exelist; do + [ -r $f -a -x $f ] || continue + lib64=`if file -L $f 2>/dev/null | \ + grep "ELF 64-bit" >/dev/null; then echo "$mark64"; fi` + ldd $f | awk '/=>/ { + if ($1 !~ /libNoVersion.so/ && $1 !~ /4[um]lib.so/ && $1 !~ /libredhat-kernel.so/) { + gsub(/'\''"/,"\\&",$1); + printf "%s'$lib64'\n", $1 + } + }' + done | xargs -r -n 1 basename | sort -u + +# +# --- Library dependency sonames. + for f in $liblist; do + [ -r $f ] || continue + lib64=`if file -L $f 2>/dev/null | \ + grep "ELF 64-bit" >/dev/null; then echo "$mark64"; fi` + ldd $f | awk '/=>/ { + if ($1 !~ /libNoVersion.so/ && $1 !~ /4[um]lib.so/ && $1 !~ /libredhat-kernel.so/) { + gsub(/'\''"/,"\\&",$1); + printf "%s'$lib64'\n", $1 + } + }' + done | xargs -r -n 1 basename | sort -u +fi + +# +# --- Script interpreters. +for f in $scriptlist; do + [ -r $f -a -x $f ] || continue + interp=`head -1 $f | sed -e 's/^\#\![ ]*//' | cut -d" " -f1` + interplist="$interplist $interp" + case $interp in + */perl) perllist="$perllist $f" ;; + esac +done +[ -n "$interplist" ] && { echo "$interplist" | tr '[:blank:]' \\n | sort -u ; } + +# +# --- Add perl module files to perllist. +for f in $filelist; do + [ -r $f -a "${f%.pm}" != "${f}" ] && perllist="$perllist $f" +done + +# +# --- Weak symbol versions (from glibc). +[ -n "$mark64" ] && mark64="(64bit)" +for f in $liblist $exelist ; do + [ -r $f ] || continue + lib64=`if file -L $f 2>/dev/null | \ + grep "ELF 64-bit" >/dev/null; then echo "$mark64"; fi` + objdump -p $f | awk 'BEGIN { START=0; LIBNAME=""; needed='$needed'; } + /^$/ { START=0; } + /^Dynamic Section:$/ { START=1; } + (START==1) && /NEEDED/ { + if (needed) { + if ("'$lib64'" != "") { + sub(/$/, "()'$lib64'", $2) ; + } + print $2 ; + } + } + /^Version References:$/ { START=2; } + (START==2) && /required from/ { + sub(/:/, "", $3); + LIBNAME=$3; + } + (START==2) && (LIBNAME!="") && ($4!="") && (($4~/^GLIBC_*/) || ($4~/^GCC_*/)) { + print LIBNAME "(" $4 ")'$lib64'"; + } + ' +done | sort -u + +# +# --- Perl modules. +[ -x /usr/lib/rpm/redhat/perl.req -a -n "$perllist" ] && \ + echo $perllist | tr '[:blank:]' \\n | /usr/lib/rpm/redhat/perl.req | sort -u + +# +# --- Python modules. +[ -x /usr/lib/rpm/redhat/python.req -a -n "$pythonlist" ] && \ + echo $pythonlist | tr '[:blank:]' \\n | /usr/lib/rpm/redhat/python.req | sort -u + +# +# --- Tcl modules. +[ -x /usr/lib/rpm/redhat/tcl.req -a -n "$tcllist" ] && \ + echo $tcllist | tr '[:blank:]' \\n | /usr/lib/rpm/redhat/tcl.req | sort -u + +exit 0 diff --git a/macros b/macros new file mode 100644 index 0000000..7cd98b6 --- /dev/null +++ b/macros @@ -0,0 +1,115 @@ +# Per-platform rpm configuration file. + +#============================================================================== +# ---- per-platform macros. +# +%_arch i386 +%_vendor redhat +%_os linux +%_gnu -gnu +%_target_platform %{_target_cpu}-%{_vendor}-%{_target_os} +%optflags -O2 -march=i386 -mcpu=i686 -g + +#============================================================================== +# ---- configure macros. +# +%_prefix /usr +%_exec_prefix %{_prefix} +%_bindir %{_exec_prefix}/bin +%_sbindir %{_exec_prefix}/sbin +%_libexecdir %{_exec_prefix}/libexec +%_datadir %{_prefix}/share +%_sysconfdir /etc +%_sharedstatedir %{_prefix}/com +%_localstatedir /var +%_lib lib +%_libdir %{_exec_prefix}/%{_lib} +%_includedir %{_prefix}/include +%_oldincludedir /usr/include +%_infodir /usr/share/info +%_mandir /usr/share/man +%_initrddir %{_sysconfdir}/rc.d/init.d + +%_defaultdocdir %{_usr}/share/doc + +#============================================================================== +# ---- configure and makeinstall. +# +%configure \ + CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \ + CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \ + FFLAGS="${FFLAGS:-%optflags}" ; export FFLAGS ; \ + ./configure %{_target_platform} \\\ + --prefix=%{_prefix} \\\ + --exec-prefix=%{_exec_prefix} \\\ + --bindir=%{_bindir} \\\ + --sbindir=%{_sbindir} \\\ + --sysconfdir=%{_sysconfdir} \\\ + --datadir=%{_datadir} \\\ + --includedir=%{_includedir} \\\ + --libdir=%{_libdir} \\\ + --libexecdir=%{_libexecdir} \\\ + --localstatedir=%{_localstatedir} \\\ + --sharedstatedir=%{_sharedstatedir} \\\ + --mandir=%{_mandir} \\\ + --infodir=%{_infodir} + +%makeinstall \ + make \\\ + prefix=%{?buildroot:%{buildroot}}%{_prefix} \\\ + exec_prefix=%{?buildroot:%{buildroot}}%{_exec_prefix} \\\ + bindir=%{?buildroot:%{buildroot}}%{_bindir} \\\ + sbindir=%{?buildroot:%{buildroot}}%{_sbindir} \\\ + sysconfdir=%{?buildroot:%{buildroot}}%{_sysconfdir} \\\ + datadir=%{?buildroot:%{buildroot}}%{_datadir} \\\ + includedir=%{?buildroot:%{buildroot}}%{_includedir} \\\ + libdir=%{?buildroot:%{buildroot}}%{_libdir} \\\ + libexecdir=%{?buildroot:%{buildroot}}%{_libexecdir} \\\ + localstatedir=%{?buildroot:%{buildroot}}%{_localstatedir} \\\ + sharedstatedir=%{?buildroot:%{buildroot}}%{_sharedstatedir} \\\ + mandir=%{?buildroot:%{buildroot}}%{_mandir} \\\ + infodir=%{?buildroot:%{buildroot}}%{_infodir} \\\ + install + +%_smp_mflags %([ -z "$RPM_BUILD_NCPUS" ] \\\ + && RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`"; \\\ + [ "$RPM_BUILD_NCPUS" -gt 1 ] && echo "-j$RPM_BUILD_NCPUS") + + +#============================================================================== +# ---- Build policy macros. +# +#--------------------------------------------------------------------- +# Expanded at end of %install scriptlet. +# + +%__arch_install_post %{nil} + +%__os_install_post \ + /usr/lib/rpm/redhat/brp-compress \ + /usr/lib/rpm/redhat/brp-strip \ + /usr/lib/rpm/redhat/brp-strip-comment-note \ +%{nil} + +%__spec_install_post\ + %{__arch_install_post}\ + %{__os_install_post}\ +%{nil} + +#--------------------------------------------------------------------- +# Expanded at end of %prep +# +%__id_u %{__id} -u +%__chown_Rhf %{__chown} -Rhf +%__chgrp_Rhf %{__chgrp} -Rhf +%_fixowner [ `%{__id_u}` = '0' ] && %{__chown_Rhf} root +%_fixgroup [ `%{__id_u}` = '0' ] && %{__chgrp_Rhf} root +%_fixperms %{__chmod} -Rf a+rX,g-w,o-w +#--------------------------------------------------------------------- +# Always use %defattr(-,root,root) in %files (added in rpm-4.0.4) +# +#%files(n:f:) %%files%{?-f: -f %{-f*}}%{?-n: -n %{-n*}} %{?1}\ +#%defattr(-,root,root,-)\ +#%{nil} + + diff --git a/perl.prov b/perl.prov new file mode 100755 index 0000000..adf987f --- /dev/null +++ b/perl.prov @@ -0,0 +1,180 @@ +#!/usr/bin/perl + +# RPM (and it's source code) is covered under two separate licenses. + +# The entire code base may be distributed under the terms of the GNU +# General Public License (GPL), which appears immediately below. +# Alternatively, all of the source code in the lib subdirectory of the +# RPM source code distribution as well as any code derived from that +# code may instead be distributed under the GNU Library General Public +# License (LGPL), at the choice of the distributor. The complete text +# of the LGPL appears at the bottom of this file. + +# This alternative is allowed to enable applications to be linked +# against the RPM library (commonly called librpm) without forcing +# such applications to be distributed under the GPL. + +# Any questions regarding the licensing of RPM should be addressed to +# Erik Troan . + +# a simple script to print the proper name for perl libraries. + +# To save development time I do not parse the perl grammmar but +# instead just lex it looking for what I want. I take special care to +# ignore comments and pod's. + +# it would be much better if perl could tell us the proper name of a +# given script. + +# The filenames to scan are either passed on the command line or if +# that is empty they are passed via stdin. + +# If there are lines in the file which match the pattern +# (m/^\s*\$VERSION\s*=\s+/) +# then these are taken to be the version numbers of the modules. +# Special care is taken with a few known idioms for specifying version +# numbers of files under rcs/cvs control. + +# If there are strings in the file which match the pattern +# m/^\s*\$RPM_Provides\s*=\s*["'](.*)['"]/i +# then these are treated as additional names which are provided by the +# file and are printed as well. + +# I plan to rewrite this in C so that perl is not required by RPM at +# build time. + +# by Ken Estes Mail.com kestes@staff.mail.com + +if ("@ARGV") { + foreach (@ARGV) { + process_file($_); + } +} else { + + # notice we are passed a list of filenames NOT as common in unix the + # contents of the file. + + foreach (<>) { + process_file($_); + } +} + + +foreach $module (sort keys %require) { + if (length($require{$module}) == 0) { + print "perl($module)\n"; + } else { + + # I am not using rpm3.0 so I do not want spaces arround my + # operators. Also I will need to change the processing of the + # $RPM_* variable when I upgrade. + + print "perl($module) = $require{$module}\n"; + } +} + +exit 0; + + + +sub process_file { + + my ($file) = @_; + chomp $file; + + open(FILE, "<$file") || return; + + my ($package, $version, $incomment, $inover) = (); + + while () { + + # skip the documentation + + # we should not need to have item in this if statement (it + # properly belongs in the over/back section) but people do not + # read the perldoc. + + if (m/^=(head1|head2|pod|item)/) { + $incomment = 1; + } + + if (m/^=(cut)/) { + $incomment = 0; + $inover = 0; + } + + if (m/^=(over)/) { + $inover = 1; + } + + if (m/^=(back)/) { + $inover = 0; + } + + if ($incomment || $inover) { + next; + } + + # skip the data section + if (m/^__(DATA|END)__$/) { + last; + } + + # not everyone puts the package name of the file as the first + # package name so we report all namespaces as if they were + # provided packages (really ugly). + + if (m/^\s*package\s+([_:a-zA-Z0-9]+)\s*;/) { + $package=$1; + undef $version; + $require{$package}=undef; + } + + # after we found the package name take the first assignment to + # $VERSION as the version number. Exporter requires that the + # variable be called VERSION so we are safe. + + # here are examples of VERSION lines from the perl distribution + + #FindBin.pm:$VERSION = $VERSION = sprintf("%d.%02d", q$Revision$ =~ /(\d+)\.(\d+)/); + #ExtUtils/Install.pm:$VERSION = substr q$Revision$, 10; + #CGI/Apache.pm:$VERSION = (qw$Revision$)[1]; + #DynaLoader.pm:$VERSION = $VERSION = "1.03"; # avoid typo warning + + if ( + ($package) && + (m/^\s*\$VERSION\s*=\s+/) + ) { + + # first see if the version string contains the string + # '$Revision' this often causes bizzare strings and is the most + # common method of non static numbering. + + if (m/(\$Revision: (\d+[.0-9]+))/) { + $version= $2; + } elsif (m/[\'\"]?(\d+[.0-9]+)[\'\"]?/) { + + # look for a static number hard coded in the script + + $version= $1; + } + $require{$package}=$version; + } + + # Each keyword can appear multiple times. Don't + # bother with datastructures to store these strings, + # if we need to print it print it now. + + if ( m/^\s*\$RPM_Provides\s*=\s*["'](.*)['"]/i) { + foreach $_ (spit(/\s+/, $1)) { + print "$_\n"; + } + } + + } + + close(FILE) || + die("$0: Could not close file: '$file' : $!\n"); + + return ; +} diff --git a/perl.req b/perl.req new file mode 100755 index 0000000..a0a077b --- /dev/null +++ b/perl.req @@ -0,0 +1,224 @@ +#!/usr/bin/perl + +# RPM (and it's source code) is covered under two separate licenses. + +# The entire code base may be distributed under the terms of the GNU +# General Public License (GPL), which appears immediately below. +# Alternatively, all of the source code in the lib subdirectory of the +# RPM source code distribution as well as any code derived from that +# code may instead be distributed under the GNU Library General Public +# License (LGPL), at the choice of the distributor. The complete text +# of the LGPL appears at the bottom of this file. + +# This alternatively is allowed to enable applications to be linked +# against the RPM library (commonly called librpm) without forcing +# such applications to be distributed under the GPL. + +# Any questions regarding the licensing of RPM should be addressed to +# Erik Troan . + +# a simple makedepends like script for perl. + +# To save development time I do not parse the perl grammmar but +# instead just lex it looking for what I want. I take special care to +# ignore comments and pod's. + +# It would be much better if perl could tell us the dependencies of a +# given script. + +# The filenames to scan are either passed on the command line or if +# that is empty they are passed via stdin. + +# If there are strings in the file which match the pattern +# m/^\s*\$RPM_Requires\s*=\s*["'](.*)['"]/i +# then these are treated as additional names which are required by the +# file and are printed as well. + +# I plan to rewrite this in C so that perl is not required by RPM at +# build time. + +# by Ken Estes Mail.com kestes@staff.mail.com + +if ("@ARGV") { + foreach (@ARGV) { + process_file($_); + } +} else { + + # notice we are passed a list of filenames NOT as common in unix the + # contents of the file. + + foreach (<>) { + process_file($_); + } +} + + +foreach $module (sort keys %require) { + if (length($require{$module}) == 0) { + print "perl($module)\n"; + } else { + + # I am not using rpm3.0 so I do not want spaces arround my + # operators. Also I will need to change the processing of the + # $RPM_* vairable when I upgrage. + + print "perl($module) >= $require{$module}\n"; + } +} + +exit 0; + + + +sub process_file { + + my ($file) = @_; + chomp $file; + + open(FILE, "<$file") || return; + + while () { + + # skip the documentation + + # we should not need to have item in this if statement (it + # properly belongs in the over/back section) but people do not + # read the perldoc. + + if ( (m/^=(head1|head2|pod|item)/) .. (m/^=(cut)/) ) { + next; + } + + if ( (m/^=(over)/) .. (m/^=(back)/) ) { + next; + } + + # skip the data section + if (m/^__(DATA|END)__$/) { + last; + } + + # Each keyword can appear multiple times. Don't + # bother with datastructures to store these strings, + # if we need to print it print it now. + + if ( m/^\s*\$RPM_Requires\s*=\s*["'](.*)['"]/i) { + foreach $_ (split(/\s+/, $1)) { + print "$_\n"; + } + } + + if ( + +# ouch could be in a eval, perhaps we do not want these since we catch +# an exception they must not be required + +# eval { require Term::ReadLine } or die $@; +# eval "require Term::Rendezvous;" or die $@; +# eval { require Carp } if defined $^S; # If error/warning during compilation, + + + (m/^(\s*) # we hope the inclusion starts the line + (require|use)\s+(?!\{) # do not want 'do {' loops + # quotes around name are always legal + [\'\"]?([^\;\ \'\"\t]*)[\'\"]?[\t\;\ ] + # the syntax for 'use' allows version requirements + \s*([.0-9]*) + /x) + ) { + my ($whitespace, $statement, $module, $version) = ($1, $2, $3,$4); + + # we only consider require statements that are flush against + # the left edge. any other require statements give too many + # false positives, as they are usually inside of an if statement + # as a fallback module or a rarely used option + + ($whitespace ne "" && $statement eq "require") && next; + + # if there is some interpolation of variables just skip this + # dependency, we do not want + # do "$ENV{LOGDIR}/$rcfile"; + + ($module =~ m/\$/) && next; + + # skip if the phrase was "use of" -- shows up in gimp-perl, et al + next if $module eq 'of'; + + # if the module ends in a comma we probaly caught some + # documentation of the form 'check stuff,\n do stuff, clean + # stuff.' there are several of these in the perl distribution + + ($module =~ m/[,>]$/) && next; + + # if the module name starts in a dot it is not a module name. + # Is this necessary? Please give me an example if you turn this + # back on. + + # ($module =~ m/^\./) && next; + + # if the module ends with .pm strip it to leave only basename. + # starts with /, which means its an absolute path to a file + if ($module =~ m(^/)) { + print "$module\n"; + next; + } + + # sometimes people do use POSIX qw(foo), or use POSIX(qw(foo)) etc + # we can strip qw.*$, as well as (.*$: + $module =~ s/qw.*$//; + $module =~ s/\(*$//; + + $module =~ s/\.pm$//; + + # some perl programmers write 'require URI/URL;' when + # they mean 'require URI::URL;' + + $module =~ s/\//::/; + + # trim off trailing parenthesis if any. Sometimes people pass + # the module an empty list. + + $module =~ s/\(\s*\)$//; + + if ( $module =~ m/^[0-9._]+$/ ) { + # if module is a number then both require and use interpret that + # to mean that a particular version of perl is specified + + if ($module =~ /5.00/) { + print "perl >= 0:$module\n"; + next; + } + else { + print "perl >= 1:$module\n"; + next; + } + + }; + + # ph files do not use the package name inside the file. + # perlmodlib documentation says: + + # the .ph files made by h2ph will probably end up as + # extension modules made by h2xs. + + # so do not expend much effort on these. + + + # there is no easy way to find out if a file named systeminfo.ph + # will be included with the name sys/systeminfo.ph so only use the + # basename of *.ph files + + ($module =~ m/\.ph$/) && next; + + $require{$module}=$version; + $line{$module}=$_; + } + + } + + close(FILE) || + die("$0: Could not close file: '$file' : $!\n"); + + return ; +} diff --git a/rpmrc b/rpmrc new file mode 100644 index 0000000..f2b8c29 --- /dev/null +++ b/rpmrc @@ -0,0 +1 @@ +macrofiles: /usr/lib/rpm/macros:/usr/lib/rpm/redhat/macros:/etc/rpm/macros.specspo:/etc/rpm/macros.cdb From 72cfc641ce0b8da9d6e8503b37826b7350e25c34 Mon Sep 17 00:00:00 2001 From: Elliot Lee Date: Wed, 12 Jun 2002 13:18:39 +0000 Subject: [PATCH 002/213] sync --- redhat-rpm-config.spec | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 redhat-rpm-config.spec diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec new file mode 100644 index 0000000..fe406b3 --- /dev/null +++ b/redhat-rpm-config.spec @@ -0,0 +1,33 @@ +Summary: Red Hat specific rpm configuration files. +Name: redhat-rpm-config +Version: 8.0 +Release: 0.1 +License: GPL +Group: Development/System +Source: redhat-rpm-config-%{version}.tar.gz +BuildArch: noarch +Requires: rpmbuild(VendorConfig) <= 4.1 +BuildRoot: %{_tmppath}/%{name}-root + +%description +Red Hat specific rpm configuration files. + +%prep + +%build + +%install +rm -rf ${RPM_BUILD_ROOT} +mkdir -p ${RPM_BUILD_ROOT}%{_prefix}/lib/rpm +( cd ${RPM_BUILD_ROOT}%{_prefix}/lib/rpm; tar xzf %{SOURCE0} ) + +%clean +rm -rf ${RPM_BUILD_ROOT} + +%files +%defattr(-,root,root) +%{_prefix}/lib/rpm/redhat + +%changelog +* Sun Jun 9 2002 Jeff Johnson +- create. From f494dd7f794031a799d5c56eedbc2b98f2598e53 Mon Sep 17 00:00:00 2001 From: Elliot Lee Date: Wed, 12 Jun 2002 13:19:22 +0000 Subject: [PATCH 003/213] 7.3.91 --- redhat-rpm-config.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index fe406b3..f7ee6b0 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -1,7 +1,7 @@ Summary: Red Hat specific rpm configuration files. Name: redhat-rpm-config -Version: 8.0 -Release: 0.1 +Version: 7.3.91 +Release: 1 License: GPL Group: Development/System Source: redhat-rpm-config-%{version}.tar.gz From 99968383d11f9b8dece46df2b5f3ea549ea2c6e0 Mon Sep 17 00:00:00 2001 From: Elliot Lee Date: Wed, 12 Jun 2002 13:26:24 +0000 Subject: [PATCH 004/213] 7.3.91 --- redhat-rpm-config.spec | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index f7ee6b0..5d12f4f 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -14,12 +14,10 @@ Red Hat specific rpm configuration files. %prep -%build - %install rm -rf ${RPM_BUILD_ROOT} mkdir -p ${RPM_BUILD_ROOT}%{_prefix}/lib/rpm -( cd ${RPM_BUILD_ROOT}%{_prefix}/lib/rpm; tar xzf %{SOURCE0} ) +( cd ${RPM_BUILD_ROOT}%{_prefix}/lib/rpm; tar xzf %{SOURCE0}; mv %{name}-%{version} redhat; rm -f redhat/*.spec ) %clean rm -rf ${RPM_BUILD_ROOT} @@ -29,5 +27,8 @@ rm -rf ${RPM_BUILD_ROOT} %{_prefix}/lib/rpm/redhat %changelog +* Wed Jun 12 2002 Elliot Lee 7.3.91-1 +- Update + * Sun Jun 9 2002 Jeff Johnson - create. From 668485e883b9e951c5bdf77f76634eae6cf02059 Mon Sep 17 00:00:00 2001 From: Elliot Lee Date: Wed, 12 Jun 2002 21:04:24 +0000 Subject: [PATCH 005/213] Locale hack. --- macros | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/macros b/macros index 7cd98b6..ba33e75 100644 --- a/macros +++ b/macros @@ -112,4 +112,18 @@ #%defattr(-,root,root,-)\ #%{nil} +# Bad hack to set $LANG to C during all RPM builds +%prep %%prep\ +LANG=C\ +export LANG\ +%{nil} +%build %%build\ +LANG=C\ +export LANG\ +%{nil} + +%install %%install\ +LANG=C\ +export LANG\ +%{nil} From 8c076a37c8c2481ea2ff46a86d07d27b54cb0168 Mon Sep 17 00:00:00 2001 From: Elliot Lee Date: Thu, 20 Jun 2002 20:56:07 +0000 Subject: [PATCH 006/213] find-lang fixes --- redhat-rpm-config.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index 5d12f4f..13a79fd 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -1,7 +1,7 @@ Summary: Red Hat specific rpm configuration files. Name: redhat-rpm-config Version: 7.3.91 -Release: 1 +Release: 2 License: GPL Group: Development/System Source: redhat-rpm-config-%{version}.tar.gz @@ -27,6 +27,9 @@ rm -rf ${RPM_BUILD_ROOT} %{_prefix}/lib/rpm/redhat %changelog +* Thu Jun 20 2002 Elliot Lee 7.3.91-2 +- find-lang error detection from Havoc + * Wed Jun 12 2002 Elliot Lee 7.3.91-1 - Update From 3ee6bad5b99ab12d786901af2a32efcf46e3a456 Mon Sep 17 00:00:00 2001 From: Elliot Lee Date: Thu, 20 Jun 2002 20:56:07 +0000 Subject: [PATCH 007/213] find-lang fixes --- find-lang.sh | 6 ++++++ macros | 2 ++ redhat-rpm-config.spec | 6 +++--- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/find-lang.sh b/find-lang.sh index d333e48..8b4dcc0 100755 --- a/find-lang.sh +++ b/find-lang.sh @@ -93,3 +93,9 @@ s:'"$TOP_DIR"':: s:^\([^%].*\):: s:%lang(C) :: ' >> $MO_NAME + +if ! grep -q / $MO_NAME; then + echo "No translations found for ${NAME} in ${TOP_DIR}" + exit 1 +fi +exit 0 diff --git a/macros b/macros index ba33e75..fbbf57f 100644 --- a/macros +++ b/macros @@ -127,3 +127,5 @@ export LANG\ LANG=C\ export LANG\ %{nil} + +%find_lang /usr/lib/rpm/redhat/find-lang.sh %{buildroot} diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index 13a79fd..df9d2a2 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -1,7 +1,7 @@ Summary: Red Hat specific rpm configuration files. Name: redhat-rpm-config -Version: 7.3.91 -Release: 2 +Version: 7.3.92 +Release: 1 License: GPL Group: Development/System Source: redhat-rpm-config-%{version}.tar.gz @@ -27,7 +27,7 @@ rm -rf ${RPM_BUILD_ROOT} %{_prefix}/lib/rpm/redhat %changelog -* Thu Jun 20 2002 Elliot Lee 7.3.91-2 +* Thu Jun 20 2002 Elliot Lee 7.3.92-1 - find-lang error detection from Havoc * Wed Jun 12 2002 Elliot Lee 7.3.91-1 From d5db7f5dedf550d1fc672c1d9e8977ca3e5d830b Mon Sep 17 00:00:00 2001 From: Elliot Lee Date: Fri, 21 Jun 2002 18:13:56 +0000 Subject: [PATCH 008/213] 7.3.92-2 --- macros | 2 -- redhat-rpm-config.spec | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/macros b/macros index fbbf57f..1abe947 100644 --- a/macros +++ b/macros @@ -3,12 +3,10 @@ #============================================================================== # ---- per-platform macros. # -%_arch i386 %_vendor redhat %_os linux %_gnu -gnu %_target_platform %{_target_cpu}-%{_vendor}-%{_target_os} -%optflags -O2 -march=i386 -mcpu=i686 -g #============================================================================== # ---- configure macros. diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index df9d2a2..1af07e4 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -27,6 +27,9 @@ rm -rf ${RPM_BUILD_ROOT} %{_prefix}/lib/rpm/redhat %changelog +* Fri Jun 21 2002 Elliot Lee 7.3.92-2 +- Don't define _arch + * Thu Jun 20 2002 Elliot Lee 7.3.92-1 - find-lang error detection from Havoc From 3687e63a720668cb7f0d103f3c51374426ef1465 Mon Sep 17 00:00:00 2001 From: Elliot Lee Date: Fri, 21 Jun 2002 18:17:17 +0000 Subject: [PATCH 009/213] sync --- redhat-rpm-config.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index 1af07e4..85eb198 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -1,7 +1,7 @@ Summary: Red Hat specific rpm configuration files. Name: redhat-rpm-config Version: 7.3.92 -Release: 1 +Release: 2 License: GPL Group: Development/System Source: redhat-rpm-config-%{version}.tar.gz From f6a0040f2b3ed22b5d697359b04ce7e40f071568 Mon Sep 17 00:00:00 2001 From: Elliot Lee Date: Wed, 26 Jun 2002 14:24:45 +0000 Subject: [PATCH 010/213] ~/.rpmmacros --- rpmrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpmrc b/rpmrc index f2b8c29..2227687 100644 --- a/rpmrc +++ b/rpmrc @@ -1 +1 @@ -macrofiles: /usr/lib/rpm/macros:/usr/lib/rpm/redhat/macros:/etc/rpm/macros.specspo:/etc/rpm/macros.cdb +macrofiles: /usr/lib/rpm/macros:/usr/lib/rpm/redhat/macros:/etc/rpm/macros.specspo:/etc/rpm/macros.cdb:~/.rpmmacros From cb63b82a2d671a5b4f4224c5156a343906d53a9f Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 28 Jun 2002 05:25:23 +0000 Subject: [PATCH 011/213] Add %{?_gnu} to _target_platform. Use --host, --build, --target and --program-prefix in %configure. 7.3.92-4 --- macros | 6 ++++-- redhat-rpm-config.spec | 9 ++++++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/macros b/macros index 1abe947..6e8cd5c 100644 --- a/macros +++ b/macros @@ -6,7 +6,7 @@ %_vendor redhat %_os linux %_gnu -gnu -%_target_platform %{_target_cpu}-%{_vendor}-%{_target_os} +%_target_platform %{_target_cpu}-%{_vendor}-%{_target_os}%{?_gnu} #============================================================================== # ---- configure macros. @@ -37,7 +37,9 @@ CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \ CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \ FFLAGS="${FFLAGS:-%optflags}" ; export FFLAGS ; \ - ./configure %{_target_platform} \\\ + ./configure --host=%{_host} --build=%{_build} \\\ + --target=%{_target_platform} \\\ + --program-prefix=%{?_program_prefix:%{_program_prefix}} \\\ --prefix=%{_prefix} \\\ --exec-prefix=%{_exec_prefix} \\\ --bindir=%{_bindir} \\\ diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index 85eb198..f91863f 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -1,7 +1,7 @@ Summary: Red Hat specific rpm configuration files. Name: redhat-rpm-config Version: 7.3.92 -Release: 2 +Release: 4 License: GPL Group: Development/System Source: redhat-rpm-config-%{version}.tar.gz @@ -27,6 +27,13 @@ rm -rf ${RPM_BUILD_ROOT} %{_prefix}/lib/rpm/redhat %changelog +* Wed Jun 26 2002 Jens Petersen 7.3.92-4 +- fix %configure targetting for autoconf-2.5x (#58468) +- include ~/.rpmmacros in macrofiles file path again + +* Fri Jun 21 2002 Tim Powers 7.3.92-3 +- automated rebuild + * Fri Jun 21 2002 Elliot Lee 7.3.92-2 - Don't define _arch From 22b27c88b968f8271110c98e0b8d1d4198a06002 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 28 Jun 2002 06:19:26 +0000 Subject: [PATCH 012/213] tidy rpm changelog entry --- redhat-rpm-config.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index f91863f..fc6eb4f 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -28,7 +28,7 @@ rm -rf ${RPM_BUILD_ROOT} %changelog * Wed Jun 26 2002 Jens Petersen 7.3.92-4 -- fix %configure targetting for autoconf-2.5x (#58468) +- fix %%configure targeting for autoconf-2.5x (#58468) - include ~/.rpmmacros in macrofiles file path again * Fri Jun 21 2002 Tim Powers 7.3.92-3 From 3827110e0a259e79ee42e61454f4af679f04be44 Mon Sep 17 00:00:00 2001 From: Elliot Lee Date: Thu, 11 Jul 2002 17:07:42 +0000 Subject: [PATCH 013/213] Add /etc/rpm/macros back to make #67951 go away --- redhat-rpm-config.spec | 5 ++++- rpmrc | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index fc6eb4f..b189962 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -1,7 +1,7 @@ Summary: Red Hat specific rpm configuration files. Name: redhat-rpm-config Version: 7.3.92 -Release: 4 +Release: 5 License: GPL Group: Development/System Source: redhat-rpm-config-%{version}.tar.gz @@ -27,6 +27,9 @@ rm -rf ${RPM_BUILD_ROOT} %{_prefix}/lib/rpm/redhat %changelog +* Thu Jul 11 2002 Elliot Lee 7.3.92-5 +- Add /etc/rpm/macros back to make #67951 go away + * Wed Jun 26 2002 Jens Petersen 7.3.92-4 - fix %%configure targeting for autoconf-2.5x (#58468) - include ~/.rpmmacros in macrofiles file path again diff --git a/rpmrc b/rpmrc index 2227687..fb4a558 100644 --- a/rpmrc +++ b/rpmrc @@ -1 +1,2 @@ -macrofiles: /usr/lib/rpm/macros:/usr/lib/rpm/redhat/macros:/etc/rpm/macros.specspo:/etc/rpm/macros.cdb:~/.rpmmacros +include: /usr/lib/rpm/rpmrc +macrofiles: /usr/lib/rpm/macros:/usr/lib/rpm/redhat/macros:/etc/rpm/macros.specspo:/etc/rpm/macros.cdb:/etc/rpm/macros~/.rpmmacros From 3faabb2c8f5daf7815c8959383da39418d30db9b Mon Sep 17 00:00:00 2001 From: Elliot Lee Date: Thu, 11 Jul 2002 18:43:40 +0000 Subject: [PATCH 014/213] fix from 67368 --- find-lang.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/find-lang.sh b/find-lang.sh index 8b4dcc0..ff07589 100755 --- a/find-lang.sh +++ b/find-lang.sh @@ -80,7 +80,7 @@ find $TOP_DIR -type f|sed ' 1i\ %defattr (644, root, root, 755) s:'"$TOP_DIR"':: -'"$MO"'s:\(.*/share/locale/\)\([^/_]\+\)\(.*'"$NAME"'\.mo$\):%lang(\2) \1\2\3: +'"$MO"'s:\(.*/share/locale/\)\([^/_]\+\)\(.*/'"$NAME"'\.mo$\):%lang(\2) \1\2\3: '"$GNOME"'s:\(.*/gnome/help/'"$NAME"'/\)\([^/_]\+\):%lang(\2) \1\2: s:^\([^%].*\):: s:%lang(C) :: From 38aa58396700a1bbc85751f62f208a926588d9d2 Mon Sep 17 00:00:00 2001 From: Elliot Lee Date: Thu, 11 Jul 2002 18:46:14 +0000 Subject: [PATCH 015/213] find-lang.sh fix from 67368 --- redhat-rpm-config.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index b189962..bed9f38 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -27,6 +27,9 @@ rm -rf ${RPM_BUILD_ROOT} %{_prefix}/lib/rpm/redhat %changelog +* Thu Jul 11 2002 Elliot Lee 7.3.92-6 +- find-lang.sh fix from 67368 + * Thu Jul 11 2002 Elliot Lee 7.3.92-5 - Add /etc/rpm/macros back to make #67951 go away From 8617b2fe71e17516c25cdc026c920e38ea738bca Mon Sep 17 00:00:00 2001 From: Elliot Lee Date: Thu, 11 Jul 2002 18:48:52 +0000 Subject: [PATCH 016/213] find-requires fix from 67325 --- find-requires | 2 +- redhat-rpm-config.spec | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/find-requires b/find-requires index c3dade5..f28109f 100755 --- a/find-requires +++ b/find-requires @@ -72,7 +72,7 @@ fi # --- Script interpreters. for f in $scriptlist; do [ -r $f -a -x $f ] || continue - interp=`head -1 $f | sed -e 's/^\#\![ ]*//' | cut -d" " -f1` + interp=`head -n 1 $f | sed -e 's/^\#\![ ]*//' | cut -d" " -f1` interplist="$interplist $interp" case $interp in */perl) perllist="$perllist $f" ;; diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index bed9f38..c395ff4 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -29,6 +29,7 @@ rm -rf ${RPM_BUILD_ROOT} %changelog * Thu Jul 11 2002 Elliot Lee 7.3.92-6 - find-lang.sh fix from 67368 +- find-requires fix from 67325 * Thu Jul 11 2002 Elliot Lee 7.3.92-5 - Add /etc/rpm/macros back to make #67951 go away From 7f634c575d0613ad1ea113e57deaa8ef931fd9dd Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 15 Jul 2002 13:45:55 +0000 Subject: [PATCH 017/213] typo --- rpmrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpmrc b/rpmrc index fb4a558..3cdc7bc 100644 --- a/rpmrc +++ b/rpmrc @@ -1,2 +1,2 @@ include: /usr/lib/rpm/rpmrc -macrofiles: /usr/lib/rpm/macros:/usr/lib/rpm/redhat/macros:/etc/rpm/macros.specspo:/etc/rpm/macros.cdb:/etc/rpm/macros~/.rpmmacros +macrofiles: /usr/lib/rpm/macros:/usr/lib/rpm/redhat/macros:/etc/rpm/macros.specspo:/etc/rpm/macros.cdb:/etc/rpm/macros:~/.rpmmacros From 00cbca969b970ded6d3d0a7061b6cd5de1a08de6 Mon Sep 17 00:00:00 2001 From: Elliot Lee Date: Wed, 31 Jul 2002 17:05:22 +0000 Subject: [PATCH 018/213] Add comment about missing docs flag. --- macros | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/macros b/macros index 6e8cd5c..0976238 100644 --- a/macros +++ b/macros @@ -129,3 +129,9 @@ export LANG\ %{nil} %find_lang /usr/lib/rpm/redhat/find-lang.sh %{buildroot} + +# +# Should missing %doc files terminate a build? +# +# Note: The default value is 0 for legacy compatibility. +%_missing_doc_files_terminate_build 0 From f0352fc0402f267c8ea880a0cb3c115f669848a3 Mon Sep 17 00:00:00 2001 From: Elliot Lee Date: Wed, 31 Jul 2002 18:56:20 +0000 Subject: [PATCH 019/213] Part two of new macros --- macros | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/macros b/macros index 0976238..b1a41fc 100644 --- a/macros +++ b/macros @@ -135,3 +135,9 @@ export LANG\ # # Note: The default value is 0 for legacy compatibility. %_missing_doc_files_terminate_build 0 + +# +# Should unpackaged files in a build root terminate a build? +# +# Note: The default value should be 0 for legacy compatibility. +%_unpackaged_files_terminate_build 0 From 3031bc234c0257a9c70abbc7977a51d6ed444d0a Mon Sep 17 00:00:00 2001 From: Elliot Lee Date: Wed, 31 Jul 2002 18:57:20 +0000 Subject: [PATCH 020/213] 7.3.93 --- redhat-rpm-config.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index c395ff4..c6dcc80 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -1,7 +1,7 @@ Summary: Red Hat specific rpm configuration files. Name: redhat-rpm-config -Version: 7.3.92 -Release: 5 +Version: 7.3.93 +Release: 1 License: GPL Group: Development/System Source: redhat-rpm-config-%{version}.tar.gz @@ -27,6 +27,10 @@ rm -rf ${RPM_BUILD_ROOT} %{_prefix}/lib/rpm/redhat %changelog +* Wed Jul 31 2002 Elliot Lee 7.3.93-1 +- Add _unpackaged_files_terminate_build and +_missing_doc_files_terminate_build to macros + * Thu Jul 11 2002 Elliot Lee 7.3.92-6 - find-lang.sh fix from 67368 - find-requires fix from 67325 From 122edab4162312fa15199619e1087e91ead2bfea Mon Sep 17 00:00:00 2001 From: Elliot Lee Date: Wed, 28 Aug 2002 18:45:29 +0000 Subject: [PATCH 021/213] 7.3.94 --- redhat-rpm-config.spec | 5 ++++- rpmrc | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index c6dcc80..cebc424 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -1,6 +1,6 @@ Summary: Red Hat specific rpm configuration files. Name: redhat-rpm-config -Version: 7.3.93 +Version: 7.3.94 Release: 1 License: GPL Group: Development/System @@ -27,6 +27,9 @@ rm -rf ${RPM_BUILD_ROOT} %{_prefix}/lib/rpm/redhat %changelog +* Wed Aug 28 2002 Elliot Lee 7.3.94-1 +- Update macrofiles + * Wed Jul 31 2002 Elliot Lee 7.3.93-1 - Add _unpackaged_files_terminate_build and _missing_doc_files_terminate_build to macros diff --git a/rpmrc b/rpmrc index 3cdc7bc..9c886e6 100644 --- a/rpmrc +++ b/rpmrc @@ -1,2 +1,2 @@ include: /usr/lib/rpm/rpmrc -macrofiles: /usr/lib/rpm/macros:/usr/lib/rpm/redhat/macros:/etc/rpm/macros.specspo:/etc/rpm/macros.cdb:/etc/rpm/macros:~/.rpmmacros +macrofiles: /usr/lib/rpm/macros:/usr/lib/rpm/%{_target}/macros:/usr/lib/rpm/redhat/macros:/etc/rpm/macros.specspo:/etc/rpm/macros.cdb:/etc/rpm/macros.prelink:/etc/rpm/macros.solve:/etc/rpm/macros.up2date:/etc/rpm/macros:~/.rpmmacros From bfb314aef89d7e9a33b423dc2d1dddca7cb9c472 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Wed, 4 Sep 2002 03:12:16 +0000 Subject: [PATCH 022/213] bump version --- redhat-rpm-config.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index cebc424..ecaba59 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -1,6 +1,6 @@ Summary: Red Hat specific rpm configuration files. Name: redhat-rpm-config -Version: 7.3.94 +Version: 8.0 Release: 1 License: GPL Group: Development/System @@ -27,6 +27,9 @@ rm -rf ${RPM_BUILD_ROOT} %{_prefix}/lib/rpm/redhat %changelog +* Tue Sep 3 2002 Bill Nottingham 8.0-1 +- bump version + * Wed Aug 28 2002 Elliot Lee 7.3.94-1 - Update macrofiles From 61fb9e24ccaab07764010c1ab67e04ee5282b02c Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Mon, 16 Sep 2002 16:22:01 +0000 Subject: [PATCH 023/213] Add debug package support to %__spec_install_post --- macros | 1 + redhat-rpm-config.spec | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/macros b/macros index b1a41fc..e8287cd 100644 --- a/macros +++ b/macros @@ -92,6 +92,7 @@ %{nil} %__spec_install_post\ + %{?__debug_package:%{__debug_install_post}}\ %{__arch_install_post}\ %{__os_install_post}\ %{nil} diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index ecaba59..6e865b3 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -1,6 +1,6 @@ Summary: Red Hat specific rpm configuration files. Name: redhat-rpm-config -Version: 8.0 +Version: 8.0.1 Release: 1 License: GPL Group: Development/System @@ -27,6 +27,9 @@ rm -rf ${RPM_BUILD_ROOT} %{_prefix}/lib/rpm/redhat %changelog +* Mon Sep 16 2002 Alexander Larsson +- Add debug package support to %__spec_install_post + * Tue Sep 3 2002 Bill Nottingham 8.0-1 - bump version From 8a919b8bb95886511ca57419d99e440a26422f27 Mon Sep 17 00:00:00 2001 From: Jeremy Katz Date: Thu, 3 Oct 2002 16:31:51 +0000 Subject: [PATCH 024/213] We shouldn't be redefining everything in the redhat-rpm-config macros file, because that will start overriding things like %{_lib} -- probably more could have been snipped, but the remaining bits are at least moderately reasonable to make sure are defined according to "our policy" --- macros | 28 ++-------------------------- 1 file changed, 2 insertions(+), 26 deletions(-) diff --git a/macros b/macros index e8287cd..243d456 100644 --- a/macros +++ b/macros @@ -9,21 +9,12 @@ %_target_platform %{_target_cpu}-%{_vendor}-%{_target_os}%{?_gnu} #============================================================================== -# ---- configure macros. +# ---- configure macros. note that most of these are inherited +# from the defaults. # %_prefix /usr -%_exec_prefix %{_prefix} -%_bindir %{_exec_prefix}/bin -%_sbindir %{_exec_prefix}/sbin -%_libexecdir %{_exec_prefix}/libexec -%_datadir %{_prefix}/share %_sysconfdir /etc -%_sharedstatedir %{_prefix}/com %_localstatedir /var -%_lib lib -%_libdir %{_exec_prefix}/%{_lib} -%_includedir %{_prefix}/include -%_oldincludedir /usr/include %_infodir /usr/share/info %_mandir /usr/share/man %_initrddir %{_sysconfdir}/rc.d/init.d @@ -97,21 +88,6 @@ %{__os_install_post}\ %{nil} -#--------------------------------------------------------------------- -# Expanded at end of %prep -# -%__id_u %{__id} -u -%__chown_Rhf %{__chown} -Rhf -%__chgrp_Rhf %{__chgrp} -Rhf -%_fixowner [ `%{__id_u}` = '0' ] && %{__chown_Rhf} root -%_fixgroup [ `%{__id_u}` = '0' ] && %{__chgrp_Rhf} root -%_fixperms %{__chmod} -Rf a+rX,g-w,o-w -#--------------------------------------------------------------------- -# Always use %defattr(-,root,root) in %files (added in rpm-4.0.4) -# -#%files(n:f:) %%files%{?-f: -f %{-f*}}%{?-n: -n %{-n*}} %{?1}\ -#%defattr(-,root,root,-)\ -#%{nil} # Bad hack to set $LANG to C during all RPM builds %prep %%prep\ From be06bd913d9620a0cd92326d73bbaae4b35b2fc6 Mon Sep 17 00:00:00 2001 From: Jeremy Katz Date: Thu, 3 Oct 2002 16:32:45 +0000 Subject: [PATCH 025/213] bump to 8.0.2, add a changelog entry --- redhat-rpm-config.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index 6e865b3..2e49614 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -1,6 +1,6 @@ Summary: Red Hat specific rpm configuration files. Name: redhat-rpm-config -Version: 8.0.1 +Version: 8.0.2 Release: 1 License: GPL Group: Development/System @@ -27,7 +27,10 @@ rm -rf ${RPM_BUILD_ROOT} %{_prefix}/lib/rpm/redhat %changelog -* Mon Sep 16 2002 Alexander Larsson +* Thu Oct 3 2002 Jeremy Katz 8.0.2 +- don't redefine everything in macros, just what we need to + +* Mon Sep 16 2002 Alexander Larsson 8.0.1 - Add debug package support to %__spec_install_post * Tue Sep 3 2002 Bill Nottingham 8.0-1 From 7f05ca8c77bbc56ee514b430f007f977ad18bdcc Mon Sep 17 00:00:00 2001 From: Elliot Lee Date: Fri, 4 Oct 2002 13:45:14 +0000 Subject: [PATCH 026/213] Be stricter now. --- macros | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/macros b/macros index 243d456..a49a3ee 100644 --- a/macros +++ b/macros @@ -66,7 +66,6 @@ && RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`"; \\\ [ "$RPM_BUILD_NCPUS" -gt 1 ] && echo "-j$RPM_BUILD_NCPUS") - #============================================================================== # ---- Build policy macros. # @@ -111,10 +110,10 @@ export LANG\ # Should missing %doc files terminate a build? # # Note: The default value is 0 for legacy compatibility. -%_missing_doc_files_terminate_build 0 +%_missing_doc_files_terminate_build 1 # # Should unpackaged files in a build root terminate a build? # # Note: The default value should be 0 for legacy compatibility. -%_unpackaged_files_terminate_build 0 +%_unpackaged_files_terminate_build 1 From d5044b55bfe6cc43c15803ee3f24348f4f788acc Mon Sep 17 00:00:00 2001 From: Elliot Lee Date: Wed, 16 Oct 2002 17:19:55 +0000 Subject: [PATCH 027/213] 8.0.3 --- macros | 4 ---- redhat-rpm-config.spec | 5 ++++- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/macros b/macros index a49a3ee..2772082 100644 --- a/macros +++ b/macros @@ -108,12 +108,8 @@ export LANG\ # # Should missing %doc files terminate a build? -# -# Note: The default value is 0 for legacy compatibility. %_missing_doc_files_terminate_build 1 # # Should unpackaged files in a build root terminate a build? -# -# Note: The default value should be 0 for legacy compatibility. %_unpackaged_files_terminate_build 1 diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index 2e49614..cdc08b9 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -1,6 +1,6 @@ Summary: Red Hat specific rpm configuration files. Name: redhat-rpm-config -Version: 8.0.2 +Version: 8.0.3 Release: 1 License: GPL Group: Development/System @@ -27,6 +27,9 @@ rm -rf ${RPM_BUILD_ROOT} %{_prefix}/lib/rpm/redhat %changelog +* Wed Oct 16 2002 Elliot Lee 8.0.3-1 +- New release that blows up on unpackaged files and missing doc files. + * Thu Oct 3 2002 Jeremy Katz 8.0.2 - don't redefine everything in macros, just what we need to From 0a68ef9360bc52f57cabbd90bc5deb8fd502b37e Mon Sep 17 00:00:00 2001 From: Phil Knirsch Date: Wed, 16 Oct 2002 18:07:49 +0000 Subject: [PATCH 028/213] - Added fix for outdated config.[sub|guess] files in %configure section. --- macros | 3 +++ redhat-rpm-config.spec | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/macros b/macros index 2772082..65759e3 100644 --- a/macros +++ b/macros @@ -28,6 +28,9 @@ CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \ CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \ FFLAGS="${FFLAGS:-%optflags}" ; export FFLAGS ; \ + for i in $(find . -name config.guess 2>/dev/null) $(find . -name config.sub 2>/dev/null) ; do \ + [ -f /usr/share/libtool/$(basename $i) ] && %{__rm} -f $i && %{__cp} -fv /usr/share/libtool/$(basename $i) $i ; \ + done ; \ ./configure --host=%{_host} --build=%{_build} \\\ --target=%{_target_platform} \\\ --program-prefix=%{?_program_prefix:%{_program_prefix}} \\\ diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index cdc08b9..8aa3483 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -1,7 +1,7 @@ Summary: Red Hat specific rpm configuration files. Name: redhat-rpm-config Version: 8.0.3 -Release: 1 +Release: 2 License: GPL Group: Development/System Source: redhat-rpm-config-%{version}.tar.gz @@ -27,6 +27,9 @@ rm -rf ${RPM_BUILD_ROOT} %{_prefix}/lib/rpm/redhat %changelog +* Wed Oct 16 2002 Phil Knirsch 8.0.3-2 +- Added fix for outdated config.[sub|guess] files in %configure section + * Wed Oct 16 2002 Elliot Lee 8.0.3-1 - New release that blows up on unpackaged files and missing doc files. From 164e1163e427b2a731af2848217b04064b97b674 Mon Sep 17 00:00:00 2001 From: Elliot Lee Date: Mon, 21 Oct 2002 15:28:51 +0000 Subject: [PATCH 029/213] find-lang fix(?) for symlinks --- find-lang.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/find-lang.sh b/find-lang.sh index ff07589..90680af 100755 --- a/find-lang.sh +++ b/find-lang.sh @@ -76,7 +76,7 @@ while test $# -gt 0 ; do esac done -find $TOP_DIR -type f|sed ' +find $TOP_DIR -type f -or -type l|sed ' 1i\ %defattr (644, root, root, 755) s:'"$TOP_DIR"':: From fa316006e8ce85e74f54c6bfbbf6ef70e61f3649 Mon Sep 17 00:00:00 2001 From: Elliot Lee Date: Thu, 31 Oct 2002 16:23:46 +0000 Subject: [PATCH 030/213] remove tracking dependency --- redhat-rpm-config.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index 8aa3483..1910b62 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -1,12 +1,12 @@ Summary: Red Hat specific rpm configuration files. Name: redhat-rpm-config Version: 8.0.3 -Release: 2 +Release: 3 License: GPL Group: Development/System Source: redhat-rpm-config-%{version}.tar.gz BuildArch: noarch -Requires: rpmbuild(VendorConfig) <= 4.1 +#Requires: rpmbuild(VendorConfig) <= 4.1 BuildRoot: %{_tmppath}/%{name}-root %description @@ -27,6 +27,9 @@ rm -rf ${RPM_BUILD_ROOT} %{_prefix}/lib/rpm/redhat %changelog +* Thu Oct 31 2002 Elliot Lee 8.0.3-3 +- Remove tracking dependency + * Wed Oct 16 2002 Phil Knirsch 8.0.3-2 - Added fix for outdated config.[sub|guess] files in %configure section From d4970a5d33d3edac755cb702ac7d2670eb551408 Mon Sep 17 00:00:00 2001 From: Elliot Lee Date: Wed, 6 Nov 2002 16:32:52 +0000 Subject: [PATCH 031/213] 8.0.4 --- redhat-rpm-config.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index 1910b62..76c2a73 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -1,7 +1,7 @@ Summary: Red Hat specific rpm configuration files. Name: redhat-rpm-config -Version: 8.0.3 -Release: 3 +Version: 8.0.4 +Release: 1 License: GPL Group: Development/System Source: redhat-rpm-config-%{version}.tar.gz @@ -27,7 +27,7 @@ rm -rf ${RPM_BUILD_ROOT} %{_prefix}/lib/rpm/redhat %changelog -* Thu Oct 31 2002 Elliot Lee 8.0.3-3 +* Thu Oct 31 2002 Elliot Lee 8.0.4-1 - Remove tracking dependency * Wed Oct 16 2002 Phil Knirsch 8.0.3-2 From f3e01161c3636836367c73dbb5e1594175a738fe Mon Sep 17 00:00:00 2001 From: Elliot Lee Date: Thu, 14 Nov 2002 12:48:21 +0000 Subject: [PATCH 032/213] Fix from bug #77849. --- find-requires | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/find-requires b/find-requires index f28109f..9de3ec2 100755 --- a/find-requires +++ b/find-requires @@ -18,7 +18,8 @@ fi # # --- Grab the file manifest and classify files. -filelist=`sed "s/['\"]/\\\&/g"` +#filelist=`sed "s/['\"]/\\\&/g"` +filelist=`sed "s/[]['\"*?{}]/\\\\\&/g"` exelist=`echo $filelist | xargs -r file | egrep -v ":.* (commands|script) " | \ grep ":.*executable" | cut -d: -f1` scriptlist=`echo $filelist | xargs -r file | \ From 27ac1446b099a61a4ae1a28069a8aef9163a61ce Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Wed, 20 Nov 2002 16:55:36 +0000 Subject: [PATCH 033/213] Make brp-strip* not strip debug objects Add a _enable_debug_packages macro (commented out) --- brp-strip | 1 + brp-strip-comment-note | 1 + brp-strip-shared | 1 + macros | 6 +++++- 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/brp-strip b/brp-strip index f959134..6f0388c 100755 --- a/brp-strip +++ b/brp-strip @@ -6,6 +6,7 @@ fi # Strip ELF binaries for f in `find $RPM_BUILD_ROOT -type f \( -perm -0100 -or -perm -0010 -or -perm -0001 \) -exec file {} \; | \ + grep -v "^${RPM_BUILD_ROOT}/\?usr/lib/debug" | \ grep -v ' shared object,' | \ sed -n -e 's/^\(.*\):[ ]*ELF.*, not stripped/\1/p'`; do strip -g $f || : diff --git a/brp-strip-comment-note b/brp-strip-comment-note index 1c853cf..15a5ed2 100755 --- a/brp-strip-comment-note +++ b/brp-strip-comment-note @@ -7,6 +7,7 @@ fi # Strip .comment and .note sections (the latter only if it is not allocated) # for already stripped elf files in the build root for f in `find $RPM_BUILD_ROOT -type f \( -perm -0100 -or -perm -0010 -or -perm -0001 \) -exec file {} \; | \ + grep -v "^${RPM_BUILD_ROOT}/\?usr/lib/debug" | \ sed -n -e 's/^\(.*\):[ ]*ELF.*, stripped/\1/p'`; do note="-R .note" if objdump -h $f | grep '^[ ]*[0-9]*[ ]*.note[ ]' -A 1 | \ diff --git a/brp-strip-shared b/brp-strip-shared index 501a278..d254f53 100755 --- a/brp-strip-shared +++ b/brp-strip-shared @@ -11,6 +11,7 @@ fi # Please note we don't restrict our search to executable files because # our libraries are not (should not be, at least) +x. for f in `find $RPM_BUILD_ROOT -type f -a -exec file {} \; | \ + grep -v "^${RPM_BUILD_ROOT}/\?usr/lib/debug" | \ grep ' shared object,' | \ sed -n -e 's/^\(.*\):[ ]*ELF.*, not stripped/\1/p'`; do strip --strip-unneeded $f diff --git a/macros b/macros index 65759e3..7aa23e2 100644 --- a/macros +++ b/macros @@ -21,6 +21,8 @@ %_defaultdocdir %{_usr}/share/doc +#%_enable_debug_packages 1 + #============================================================================== # ---- configure and makeinstall. # @@ -92,7 +94,9 @@ # Bad hack to set $LANG to C during all RPM builds -%prep %%prep\ +%prep \ +%{?_enable_debug_packages:%{debug_package}}\ +%%prep\ LANG=C\ export LANG\ %{nil} From 3b777d0999f8008f19f2b84324b895f7e5749d67 Mon Sep 17 00:00:00 2001 From: Elliot Lee Date: Thu, 21 Nov 2002 15:16:38 +0000 Subject: [PATCH 034/213] 8.0.5 --- macros | 4 ++++ redhat-rpm-config.spec | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/macros b/macros index 7aa23e2..fb60e6c 100644 --- a/macros +++ b/macros @@ -120,3 +120,7 @@ export LANG\ # # Should unpackaged files in a build root terminate a build? %_unpackaged_files_terminate_build 1 + +%__find_provides /usr/lib/rpm/redhat/find-provides +%__find_requires /usr/lib/rpm/redhat/find-requires + diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index 76c2a73..9f00fab 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -1,6 +1,6 @@ Summary: Red Hat specific rpm configuration files. Name: redhat-rpm-config -Version: 8.0.4 +Version: 8.0.5 Release: 1 License: GPL Group: Development/System @@ -27,6 +27,9 @@ rm -rf ${RPM_BUILD_ROOT} %{_prefix}/lib/rpm/redhat %changelog +* Thu Nov 21 2002 Elliot Lee 8.0.5-1 +- Update macros to specify find-provides/find-requires + * Thu Oct 31 2002 Elliot Lee 8.0.4-1 - Remove tracking dependency From 1de7d81cf05827bfc39d31de238cddc962ffff74 Mon Sep 17 00:00:00 2001 From: Elliot Lee Date: Thu, 21 Nov 2002 16:54:33 +0000 Subject: [PATCH 035/213] Pass __strip and __objdump macros --- brp-strip | 5 +++-- brp-strip-comment-note | 9 +++++++-- brp-strip-shared | 4 +++- macros | 4 ++-- redhat-rpm-config.spec | 5 ++++- 5 files changed, 19 insertions(+), 8 deletions(-) diff --git a/brp-strip b/brp-strip index 6f0388c..3a4f923 100755 --- a/brp-strip +++ b/brp-strip @@ -3,11 +3,12 @@ if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ]; then exit 0 fi - +[ -z "$STRIP" -a -n "$1" ] && STRIP="$1" +[ -z "$STRIP" ] && STRIP=strip # Strip ELF binaries for f in `find $RPM_BUILD_ROOT -type f \( -perm -0100 -or -perm -0010 -or -perm -0001 \) -exec file {} \; | \ grep -v "^${RPM_BUILD_ROOT}/\?usr/lib/debug" | \ grep -v ' shared object,' | \ sed -n -e 's/^\(.*\):[ ]*ELF.*, not stripped/\1/p'`; do - strip -g $f || : + $STRIP -g $f || : done diff --git a/brp-strip-comment-note b/brp-strip-comment-note index 15a5ed2..db32226 100755 --- a/brp-strip-comment-note +++ b/brp-strip-comment-note @@ -4,15 +4,20 @@ if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ]; then exit 0 fi +[ -z "$STRIP" -a -n "$1" ] && STRIP="$1" +[ -z "$OBJDUMP" -a -n "$2" ] && OBJDUMP="$2" +[ -z "$STRIP" ] && STRIP=strip +[ -z "$OBJDUMP" ] && OBJDUMP=objdump + # Strip .comment and .note sections (the latter only if it is not allocated) # for already stripped elf files in the build root for f in `find $RPM_BUILD_ROOT -type f \( -perm -0100 -or -perm -0010 -or -perm -0001 \) -exec file {} \; | \ grep -v "^${RPM_BUILD_ROOT}/\?usr/lib/debug" | \ sed -n -e 's/^\(.*\):[ ]*ELF.*, stripped/\1/p'`; do note="-R .note" - if objdump -h $f | grep '^[ ]*[0-9]*[ ]*.note[ ]' -A 1 | \ + if $OBJDUMP -h $f | grep '^[ ]*[0-9]*[ ]*.note[ ]' -A 1 | \ grep ALLOC >/dev/null; then note= fi - strip -R .comment $note $f || : + $STRIP -R .comment $note $f || : done diff --git a/brp-strip-shared b/brp-strip-shared index d254f53..1e8300e 100755 --- a/brp-strip-shared +++ b/brp-strip-shared @@ -7,6 +7,8 @@ if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ]; then exit 0 fi +[ -z "$STRIP" -a -n "$1" ] && STRIP="$1" +[ -z "$STRIP" ] && STRIP=strip # Strip ELF shared objects # Please note we don't restrict our search to executable files because # our libraries are not (should not be, at least) +x. @@ -14,5 +16,5 @@ for f in `find $RPM_BUILD_ROOT -type f -a -exec file {} \; | \ grep -v "^${RPM_BUILD_ROOT}/\?usr/lib/debug" | \ grep ' shared object,' | \ sed -n -e 's/^\(.*\):[ ]*ELF.*, not stripped/\1/p'`; do - strip --strip-unneeded $f + $STRIP --strip-unneeded $f done diff --git a/macros b/macros index fb60e6c..942f1b2 100644 --- a/macros +++ b/macros @@ -82,8 +82,8 @@ %__os_install_post \ /usr/lib/rpm/redhat/brp-compress \ - /usr/lib/rpm/redhat/brp-strip \ - /usr/lib/rpm/redhat/brp-strip-comment-note \ + /usr/lib/rpm/redhat/brp-strip %{__strip} \ + /usr/lib/rpm/redhat/brp-strip-comment-note %{__strip} %{__objdump} \ %{nil} %__spec_install_post\ diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index 9f00fab..1115940 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -1,6 +1,6 @@ Summary: Red Hat specific rpm configuration files. Name: redhat-rpm-config -Version: 8.0.5 +Version: 8.0.6 Release: 1 License: GPL Group: Development/System @@ -27,6 +27,9 @@ rm -rf ${RPM_BUILD_ROOT} %{_prefix}/lib/rpm/redhat %changelog +* Thu Nov 21 2002 Elliot Lee 8.0.6-1 +- Pass __strip and __objdump macros + * Thu Nov 21 2002 Elliot Lee 8.0.5-1 - Update macros to specify find-provides/find-requires From 53cca9f509d822fb9208273c86a2f563878ce5d6 Mon Sep 17 00:00:00 2001 From: Elliot Lee Date: Thu, 21 Nov 2002 17:22:31 +0000 Subject: [PATCH 036/213] More reasons why rpmrc's "macrofiles" directive is broken. --- rpmrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpmrc b/rpmrc index 9c886e6..e83b870 100644 --- a/rpmrc +++ b/rpmrc @@ -1,2 +1,2 @@ include: /usr/lib/rpm/rpmrc -macrofiles: /usr/lib/rpm/macros:/usr/lib/rpm/%{_target}/macros:/usr/lib/rpm/redhat/macros:/etc/rpm/macros.specspo:/etc/rpm/macros.cdb:/etc/rpm/macros.prelink:/etc/rpm/macros.solve:/etc/rpm/macros.up2date:/etc/rpm/macros:~/.rpmmacros +macrofiles: /usr/lib/rpm/macros:/usr/lib/rpm/%{_target}/macros:/usr/lib/rpm/redhat/macros:/etc/rpm/macros.specspo:/etc/rpm/macros.cdb:/etc/rpm/macros.prelink:/etc/rpm/macros.solve:/etc/rpm/macros.up2date:/etc/rpm/macros:/etc/rpm/%{_target}/macros:~/.rpmmacros From dce3663fe68413c7fd23b4b0878a9b98bca7e828 Mon Sep 17 00:00:00 2001 From: Elliot Lee Date: Fri, 22 Nov 2002 18:56:01 +0000 Subject: [PATCH 037/213] enable debug packages, etc. --- find-provides | 2 ++ find-requires | 3 ++- macros | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/find-provides b/find-provides index 2743a08..e955b15 100755 --- a/find-provides +++ b/find-provides @@ -3,6 +3,8 @@ # This script reads filenames from STDIN and outputs any relevant provides # information that needs to be included in the package. +[ -z "$OBJDUMP" ] && OBJDUMP=objdump + filelist=`sed "s/['\"]/\\\&/g"` solist=$(echo $filelist | grep "\\.so" | grep -v "^/lib/ld.so" | \ diff --git a/find-requires b/find-requires index 9de3ec2..0d8d868 100755 --- a/find-requires +++ b/find-requires @@ -15,6 +15,7 @@ if [ X"$1" = Xldd ]; then elif [ X"$1" = Xobjdump ]; then needed=1 fi +[ -z "$OBJDUMP" ] && OBJDUMP=objdump # # --- Grab the file manifest and classify files. @@ -94,7 +95,7 @@ for f in $liblist $exelist ; do [ -r $f ] || continue lib64=`if file -L $f 2>/dev/null | \ grep "ELF 64-bit" >/dev/null; then echo "$mark64"; fi` - objdump -p $f | awk 'BEGIN { START=0; LIBNAME=""; needed='$needed'; } + $OBJDUMP -p $f | awk 'BEGIN { START=0; LIBNAME=""; needed='$needed'; } /^$/ { START=0; } /^Dynamic Section:$/ { START=1; } (START==1) && /NEEDED/ { diff --git a/macros b/macros index 942f1b2..358d43c 100644 --- a/macros +++ b/macros @@ -21,7 +21,7 @@ %_defaultdocdir %{_usr}/share/doc -#%_enable_debug_packages 1 +%_enable_debug_packages 1 #============================================================================== # ---- configure and makeinstall. From 389ef3b0722786331a2127c19ee74ba9c61ade1a Mon Sep 17 00:00:00 2001 From: Elliot Lee Date: Fri, 22 Nov 2002 18:57:51 +0000 Subject: [PATCH 038/213] 8.0.7 --- redhat-rpm-config.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index 1115940..e4a94c8 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -1,6 +1,6 @@ Summary: Red Hat specific rpm configuration files. Name: redhat-rpm-config -Version: 8.0.6 +Version: 8.0.7 Release: 1 License: GPL Group: Development/System @@ -27,6 +27,9 @@ rm -rf ${RPM_BUILD_ROOT} %{_prefix}/lib/rpm/redhat %changelog +* Fri Nov 22 2002 Elliot Lee 8.0.7-1 +- turn on debug packages + * Thu Nov 21 2002 Elliot Lee 8.0.6-1 - Pass __strip and __objdump macros From 3f184f50a8264627bd45d76080dac5107aaf431c Mon Sep 17 00:00:00 2001 From: Elliot Lee Date: Mon, 25 Nov 2002 19:27:56 +0000 Subject: [PATCH 039/213] add -g --- rpmrc | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/rpmrc b/rpmrc index e83b870..9465800 100644 --- a/rpmrc +++ b/rpmrc @@ -1,2 +1,53 @@ include: /usr/lib/rpm/rpmrc +optflags: i386 -O2 -march=i386 -mcpu=i686 -g +optflags: i486 -O2 -march=i486 -g +optflags: i586 -O2 -march=i586 -g +optflags: i686 -O2 -march=i686 -g +optflags: athlon -O2 -march=athlon -g +optflags: ia64 -O2 -g +optflags: x86_64 -O2 -g + +# XXX Please note that -mieee has been added in rpm-3.0.5. +optflags: alpha -O2 -mieee -g +optflags: alphaev5 -O2 -mieee -mcpu=ev5 -g +optflags: alphaev56 -O2 -mieee -mcpu=ev56 -g +optflags: alphapca56 -O2 -mieee -mcpu=pca56 -g +optflags: alphaev6 -O2 -mieee -mcpu=ev6 -g +optflags: alphaev67 -O2 -mieee -mcpu=ev67 -g + +optflags: sparc -O2 -m32 -mtune=ultrasparc -g +optflags: sparcv9 -O2 -m32 -mcpu=ultrasparc -g +optflags: sparc64 -O2 -m64 -mcpu=ultrasparc -g + +optflags: m68k -O2 -fomit-frame-pointer -g + +optflags: ppc -O2 -fsigned-char -g +optflags: ppciseries -O2 -fsigned-char -g +optflags: ppcpseries -O2 -fsigned-char -g +optflags: ppc64 -O2 -fsigned-char -g + +optflags: parisc -O2 -mpa-risc-1-0 -g +optflags: hppa1.0 -O2 -mpa-risc-1-0 -g +optflags: hppa1.1 -O2 -mpa-risc-1-0 -g +optflags: hppa1.2 -O2 -mpa-risc-1-0 -g +optflags: hppa2.0 -O2 -mpa-risc-1-0 -g + +optflags: mips -O2 -g +optflags: mipsel -O2 -g + +optflags: armv3l -O2 -fsigned-char -fomit-frame-pointer -march=armv3 -g +optflags: armv4b -O2 -fsigned-char -fomit-frame-pointer -march=armv4 -g +optflags: armv4l -O2 -fsigned-char -fomit-frame-pointer -march=armv4 -g + +optflags: atarist -O2 -fomit-frame-pointer -g +optflags: atariste -O2 -fomit-frame-pointer -g +optflags: ataritt -O2 -fomit-frame-pointer -g +optflags: falcon -O2 -fomit-frame-pointer -g +optflags: atariclone -O2 -fomit-frame-pointer -g +optflags: milan -O2 -fomit-frame-pointer -g +optflags: hades -O2 -fomit-frame-pointer -g + +optflags: s390 -O2 -g +optflags: s390x -O2 -g + macrofiles: /usr/lib/rpm/macros:/usr/lib/rpm/%{_target}/macros:/usr/lib/rpm/redhat/macros:/etc/rpm/macros.specspo:/etc/rpm/macros.cdb:/etc/rpm/macros.prelink:/etc/rpm/macros.solve:/etc/rpm/macros.up2date:/etc/rpm/macros:/etc/rpm/%{_target}/macros:~/.rpmmacros From c643f846cea472bad5172421417e905f9c4b9ade Mon Sep 17 00:00:00 2001 From: Elliot Lee Date: Mon, 25 Nov 2002 20:44:00 +0000 Subject: [PATCH 040/213] 8.0.7-2 --- redhat-rpm-config.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index e4a94c8..d91b938 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -1,7 +1,7 @@ Summary: Red Hat specific rpm configuration files. Name: redhat-rpm-config Version: 8.0.7 -Release: 1 +Release: 2 License: GPL Group: Development/System Source: redhat-rpm-config-%{version}.tar.gz From 47209decbed507e488d30fb871a356eacdb8899f Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Wed, 4 Dec 2002 04:55:22 +0000 Subject: [PATCH 041/213] nuke -g --- macros | 2 +- redhat-rpm-config.spec | 8 +++-- rpmrc | 80 +++++++++++++++++++++--------------------- 3 files changed, 47 insertions(+), 43 deletions(-) diff --git a/macros b/macros index 358d43c..942f1b2 100644 --- a/macros +++ b/macros @@ -21,7 +21,7 @@ %_defaultdocdir %{_usr}/share/doc -%_enable_debug_packages 1 +#%_enable_debug_packages 1 #============================================================================== # ---- configure and makeinstall. diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index d91b938..3150f29 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -1,7 +1,7 @@ Summary: Red Hat specific rpm configuration files. Name: redhat-rpm-config -Version: 8.0.7 -Release: 2 +Version: 8.0.8 +Release: 1 License: GPL Group: Development/System Source: redhat-rpm-config-%{version}.tar.gz @@ -27,6 +27,10 @@ rm -rf ${RPM_BUILD_ROOT} %{_prefix}/lib/rpm/redhat %changelog +* Tue Dec 3 2002 Bill Nottingham 8.0.8-1 +- turn debug packages off +- override optflags with no -g + * Fri Nov 22 2002 Elliot Lee 8.0.7-1 - turn on debug packages diff --git a/rpmrc b/rpmrc index 9465800..bc33626 100644 --- a/rpmrc +++ b/rpmrc @@ -1,53 +1,53 @@ include: /usr/lib/rpm/rpmrc -optflags: i386 -O2 -march=i386 -mcpu=i686 -g -optflags: i486 -O2 -march=i486 -g -optflags: i586 -O2 -march=i586 -g -optflags: i686 -O2 -march=i686 -g -optflags: athlon -O2 -march=athlon -g -optflags: ia64 -O2 -g -optflags: x86_64 -O2 -g +optflags: i386 -O2 -march=i386 -mcpu=i686 +optflags: i486 -O2 -march=i486 +optflags: i586 -O2 -march=i586 +optflags: i686 -O2 -march=i686 +optflags: athlon -O2 -march=athlon +optflags: ia64 -O2 +optflags: x86_64 -O2 # XXX Please note that -mieee has been added in rpm-3.0.5. -optflags: alpha -O2 -mieee -g -optflags: alphaev5 -O2 -mieee -mcpu=ev5 -g -optflags: alphaev56 -O2 -mieee -mcpu=ev56 -g -optflags: alphapca56 -O2 -mieee -mcpu=pca56 -g -optflags: alphaev6 -O2 -mieee -mcpu=ev6 -g -optflags: alphaev67 -O2 -mieee -mcpu=ev67 -g +optflags: alpha -O2 -mieee +optflags: alphaev5 -O2 -mieee -mcpu=ev5 +optflags: alphaev56 -O2 -mieee -mcpu=ev56 +optflags: alphapca56 -O2 -mieee -mcpu=pca56 +optflags: alphaev6 -O2 -mieee -mcpu=ev6 +optflags: alphaev67 -O2 -mieee -mcpu=ev67 -optflags: sparc -O2 -m32 -mtune=ultrasparc -g -optflags: sparcv9 -O2 -m32 -mcpu=ultrasparc -g -optflags: sparc64 -O2 -m64 -mcpu=ultrasparc -g +optflags: sparc -O2 -m32 -mtune=ultrasparc +optflags: sparcv9 -O2 -m32 -mcpu=ultrasparc +optflags: sparc64 -O2 -m64 -mcpu=ultrasparc -optflags: m68k -O2 -fomit-frame-pointer -g +optflags: m68k -O2 -fomit-frame-pointer -optflags: ppc -O2 -fsigned-char -g -optflags: ppciseries -O2 -fsigned-char -g -optflags: ppcpseries -O2 -fsigned-char -g -optflags: ppc64 -O2 -fsigned-char -g +optflags: ppc -O2 -fsigned-char +optflags: ppciseries -O2 -fsigned-char +optflags: ppcpseries -O2 -fsigned-char +optflags: ppc64 -O2 -fsigned-char -optflags: parisc -O2 -mpa-risc-1-0 -g -optflags: hppa1.0 -O2 -mpa-risc-1-0 -g -optflags: hppa1.1 -O2 -mpa-risc-1-0 -g -optflags: hppa1.2 -O2 -mpa-risc-1-0 -g -optflags: hppa2.0 -O2 -mpa-risc-1-0 -g +optflags: parisc -O2 -mpa-risc-1-0 +optflags: hppa1.0 -O2 -mpa-risc-1-0 +optflags: hppa1.1 -O2 -mpa-risc-1-0 +optflags: hppa1.2 -O2 -mpa-risc-1-0 +optflags: hppa2.0 -O2 -mpa-risc-1-0 -optflags: mips -O2 -g -optflags: mipsel -O2 -g +optflags: mips -O2 +optflags: mipsel -O2 -optflags: armv3l -O2 -fsigned-char -fomit-frame-pointer -march=armv3 -g -optflags: armv4b -O2 -fsigned-char -fomit-frame-pointer -march=armv4 -g -optflags: armv4l -O2 -fsigned-char -fomit-frame-pointer -march=armv4 -g +optflags: armv3l -O2 -fsigned-char -fomit-frame-pointer -march=armv3 +optflags: armv4b -O2 -fsigned-char -fomit-frame-pointer -march=armv4 +optflags: armv4l -O2 -fsigned-char -fomit-frame-pointer -march=armv4 -optflags: atarist -O2 -fomit-frame-pointer -g -optflags: atariste -O2 -fomit-frame-pointer -g -optflags: ataritt -O2 -fomit-frame-pointer -g -optflags: falcon -O2 -fomit-frame-pointer -g -optflags: atariclone -O2 -fomit-frame-pointer -g -optflags: milan -O2 -fomit-frame-pointer -g -optflags: hades -O2 -fomit-frame-pointer -g +optflags: atarist -O2 -fomit-frame-pointer +optflags: atariste -O2 -fomit-frame-pointer +optflags: ataritt -O2 -fomit-frame-pointer +optflags: falcon -O2 -fomit-frame-pointer +optflags: atariclone -O2 -fomit-frame-pointer +optflags: milan -O2 -fomit-frame-pointer +optflags: hades -O2 -fomit-frame-pointer -optflags: s390 -O2 -g -optflags: s390x -O2 -g +optflags: s390 -O2 +optflags: s390x -O2 macrofiles: /usr/lib/rpm/macros:/usr/lib/rpm/%{_target}/macros:/usr/lib/rpm/redhat/macros:/etc/rpm/macros.specspo:/etc/rpm/macros.cdb:/etc/rpm/macros.prelink:/etc/rpm/macros.solve:/etc/rpm/macros.up2date:/etc/rpm/macros:/etc/rpm/%{_target}/macros:~/.rpmmacros From 555b69e7a21f7a25b8a45a5ceafd59f4aec1a207 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Wed, 4 Dec 2002 04:57:53 +0000 Subject: [PATCH 042/213] i like make archive :) --- Makefile | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..2608fc2 --- /dev/null +++ b/Makefile @@ -0,0 +1,24 @@ +NAME=redhat-rpm-config +VERSION=$(shell awk '/Version:/ { print $$2 }' $(NAME).spec) + +CVSROOT = $(shell cat CVS/Root 2>/dev/null || :) + +CVSTAG = REDHAT_RPM_CONFIG_$(subst .,_,$(VERSION)) + +all: + +tag-archive: + @cvs -Q tag -F $(CVSTAG) + +create-archive: + @rm -rf /tmp/$(NAME) + @cd /tmp ; cvs -Q -d $(CVSROOT) export -r$(CVSTAG) $(NAME) || echo "Um... export aborted." + @mv /tmp/$(NAME) /tmp/$(NAME)-$(VERSION) + @cd /tmp ; tar -czSpf $(NAME)-$(VERSION).tar.gz $(NAME)-$(VERSION) + @rm -rf /tmp/$(NAME)-$(VERSION) + @cp /tmp/$(NAME)-$(VERSION).tar.gz . + @rm -f /tmp/$(NAME)-$(VERSION).tar.gz + @echo "" + @echo "The final archive is in $(NAME)-$(VERSION).tar.gz" + +archive: tag-archive create-archive From e44c237bfbab96439a6c527fa8cd0d108caaadf2 Mon Sep 17 00:00:00 2001 From: Elliot Lee Date: Wed, 11 Dec 2002 15:05:08 +0000 Subject: [PATCH 043/213] 8.0.9 --- macros | 1 - redhat-rpm-config.spec | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/macros b/macros index 942f1b2..979f4f1 100644 --- a/macros +++ b/macros @@ -123,4 +123,3 @@ export LANG\ %__find_provides /usr/lib/rpm/redhat/find-provides %__find_requires /usr/lib/rpm/redhat/find-requires - diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index 3150f29..8f9829f 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -1,6 +1,6 @@ Summary: Red Hat specific rpm configuration files. Name: redhat-rpm-config -Version: 8.0.8 +Version: 8.0.9 Release: 1 License: GPL Group: Development/System From 09f5ffd107613802d6fb00ac972be72ec9bb22e6 Mon Sep 17 00:00:00 2001 From: Elliot Lee Date: Wed, 11 Dec 2002 15:39:47 +0000 Subject: [PATCH 044/213] add -g --- redhat-rpm-config.spec | 2 +- rpmrc | 80 +++++++++++++++++++++--------------------- 2 files changed, 41 insertions(+), 41 deletions(-) diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index 8f9829f..a561bb9 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -1,6 +1,6 @@ Summary: Red Hat specific rpm configuration files. Name: redhat-rpm-config -Version: 8.0.9 +Version: 8.0.10 Release: 1 License: GPL Group: Development/System diff --git a/rpmrc b/rpmrc index bc33626..9465800 100644 --- a/rpmrc +++ b/rpmrc @@ -1,53 +1,53 @@ include: /usr/lib/rpm/rpmrc -optflags: i386 -O2 -march=i386 -mcpu=i686 -optflags: i486 -O2 -march=i486 -optflags: i586 -O2 -march=i586 -optflags: i686 -O2 -march=i686 -optflags: athlon -O2 -march=athlon -optflags: ia64 -O2 -optflags: x86_64 -O2 +optflags: i386 -O2 -march=i386 -mcpu=i686 -g +optflags: i486 -O2 -march=i486 -g +optflags: i586 -O2 -march=i586 -g +optflags: i686 -O2 -march=i686 -g +optflags: athlon -O2 -march=athlon -g +optflags: ia64 -O2 -g +optflags: x86_64 -O2 -g # XXX Please note that -mieee has been added in rpm-3.0.5. -optflags: alpha -O2 -mieee -optflags: alphaev5 -O2 -mieee -mcpu=ev5 -optflags: alphaev56 -O2 -mieee -mcpu=ev56 -optflags: alphapca56 -O2 -mieee -mcpu=pca56 -optflags: alphaev6 -O2 -mieee -mcpu=ev6 -optflags: alphaev67 -O2 -mieee -mcpu=ev67 +optflags: alpha -O2 -mieee -g +optflags: alphaev5 -O2 -mieee -mcpu=ev5 -g +optflags: alphaev56 -O2 -mieee -mcpu=ev56 -g +optflags: alphapca56 -O2 -mieee -mcpu=pca56 -g +optflags: alphaev6 -O2 -mieee -mcpu=ev6 -g +optflags: alphaev67 -O2 -mieee -mcpu=ev67 -g -optflags: sparc -O2 -m32 -mtune=ultrasparc -optflags: sparcv9 -O2 -m32 -mcpu=ultrasparc -optflags: sparc64 -O2 -m64 -mcpu=ultrasparc +optflags: sparc -O2 -m32 -mtune=ultrasparc -g +optflags: sparcv9 -O2 -m32 -mcpu=ultrasparc -g +optflags: sparc64 -O2 -m64 -mcpu=ultrasparc -g -optflags: m68k -O2 -fomit-frame-pointer +optflags: m68k -O2 -fomit-frame-pointer -g -optflags: ppc -O2 -fsigned-char -optflags: ppciseries -O2 -fsigned-char -optflags: ppcpseries -O2 -fsigned-char -optflags: ppc64 -O2 -fsigned-char +optflags: ppc -O2 -fsigned-char -g +optflags: ppciseries -O2 -fsigned-char -g +optflags: ppcpseries -O2 -fsigned-char -g +optflags: ppc64 -O2 -fsigned-char -g -optflags: parisc -O2 -mpa-risc-1-0 -optflags: hppa1.0 -O2 -mpa-risc-1-0 -optflags: hppa1.1 -O2 -mpa-risc-1-0 -optflags: hppa1.2 -O2 -mpa-risc-1-0 -optflags: hppa2.0 -O2 -mpa-risc-1-0 +optflags: parisc -O2 -mpa-risc-1-0 -g +optflags: hppa1.0 -O2 -mpa-risc-1-0 -g +optflags: hppa1.1 -O2 -mpa-risc-1-0 -g +optflags: hppa1.2 -O2 -mpa-risc-1-0 -g +optflags: hppa2.0 -O2 -mpa-risc-1-0 -g -optflags: mips -O2 -optflags: mipsel -O2 +optflags: mips -O2 -g +optflags: mipsel -O2 -g -optflags: armv3l -O2 -fsigned-char -fomit-frame-pointer -march=armv3 -optflags: armv4b -O2 -fsigned-char -fomit-frame-pointer -march=armv4 -optflags: armv4l -O2 -fsigned-char -fomit-frame-pointer -march=armv4 +optflags: armv3l -O2 -fsigned-char -fomit-frame-pointer -march=armv3 -g +optflags: armv4b -O2 -fsigned-char -fomit-frame-pointer -march=armv4 -g +optflags: armv4l -O2 -fsigned-char -fomit-frame-pointer -march=armv4 -g -optflags: atarist -O2 -fomit-frame-pointer -optflags: atariste -O2 -fomit-frame-pointer -optflags: ataritt -O2 -fomit-frame-pointer -optflags: falcon -O2 -fomit-frame-pointer -optflags: atariclone -O2 -fomit-frame-pointer -optflags: milan -O2 -fomit-frame-pointer -optflags: hades -O2 -fomit-frame-pointer +optflags: atarist -O2 -fomit-frame-pointer -g +optflags: atariste -O2 -fomit-frame-pointer -g +optflags: ataritt -O2 -fomit-frame-pointer -g +optflags: falcon -O2 -fomit-frame-pointer -g +optflags: atariclone -O2 -fomit-frame-pointer -g +optflags: milan -O2 -fomit-frame-pointer -g +optflags: hades -O2 -fomit-frame-pointer -g -optflags: s390 -O2 -optflags: s390x -O2 +optflags: s390 -O2 -g +optflags: s390x -O2 -g macrofiles: /usr/lib/rpm/macros:/usr/lib/rpm/%{_target}/macros:/usr/lib/rpm/redhat/macros:/etc/rpm/macros.specspo:/etc/rpm/macros.cdb:/etc/rpm/macros.prelink:/etc/rpm/macros.solve:/etc/rpm/macros.up2date:/etc/rpm/macros:/etc/rpm/%{_target}/macros:~/.rpmmacros From cec7d078f8d1d1458ccf7a6f67b99828ea2652a8 Mon Sep 17 00:00:00 2001 From: Elliot Lee Date: Wed, 11 Dec 2002 18:05:00 +0000 Subject: [PATCH 045/213] someday I will get it right --- macros | 2 +- redhat-rpm-config.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/macros b/macros index 979f4f1..ff3dd6e 100644 --- a/macros +++ b/macros @@ -21,7 +21,7 @@ %_defaultdocdir %{_usr}/share/doc -#%_enable_debug_packages 1 +%_enable_debug_packages 1 #============================================================================== # ---- configure and makeinstall. diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index a561bb9..fe23d2a 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -1,6 +1,6 @@ Summary: Red Hat specific rpm configuration files. Name: redhat-rpm-config -Version: 8.0.10 +Version: 8.0.11 Release: 1 License: GPL Group: Development/System From d18a947668e119ae692467d907098969d7ab054b Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Fri, 13 Dec 2002 17:13:18 +0000 Subject: [PATCH 046/213] Make a temporary copy of the debug_package macro so that we get the noarch fix --- macros | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/macros b/macros index ff3dd6e..868fb78 100644 --- a/macros +++ b/macros @@ -92,6 +92,22 @@ %{__os_install_post}\ %{nil} +# Template for debug information sub-package. +# NOTE: This is a copy from rpm to get the ifnarch noarch fix, it can be removed later +%debug_package \ +%ifnarch noarch\ +%global __debug_package 1\ +%package debug\ +Summary: Debug information for package %{name}\ +Group: Development/Debug\ +%description debug\ +This package provides debug information for package %{name}.\ +Debug information is useful when developing applications that use this\ +package or when debugging this package.\ +%files debug -f debugfiles.list\ +%defattr(-,root,root)\ +%endif\ +%{nil} # Bad hack to set $LANG to C during all RPM builds %prep \ From d4c201f55593bd7c9eb13c784e6205f4c400d619 Mon Sep 17 00:00:00 2001 From: Elliot Lee Date: Fri, 13 Dec 2002 17:20:16 +0000 Subject: [PATCH 047/213] 8.0.12-1 --- redhat-rpm-config.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index fe23d2a..001cea3 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -1,6 +1,6 @@ Summary: Red Hat specific rpm configuration files. Name: redhat-rpm-config -Version: 8.0.11 +Version: 8.0.12 Release: 1 License: GPL Group: Development/System @@ -27,6 +27,9 @@ rm -rf ${RPM_BUILD_ROOT} %{_prefix}/lib/rpm/redhat %changelog +* Fri Dec 13 2002 Elliot Lee 8.0.12-1 +- New release with debug packages on + * Tue Dec 3 2002 Bill Nottingham 8.0.8-1 - turn debug packages off - override optflags with no -g From ff2bb8193467ec983ef3ad4a64fa535d69f51056 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Fri, 13 Dec 2002 23:04:56 +0000 Subject: [PATCH 048/213] use internal dependency generator --- macros | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/macros b/macros index 868fb78..e3a4779 100644 --- a/macros +++ b/macros @@ -137,5 +137,9 @@ export LANG\ # Should unpackaged files in a build root terminate a build? %_unpackaged_files_terminate_build 1 +# +# Use rpm's built in dependency generator? +%_use_internal_dependency_generator 1 + %__find_provides /usr/lib/rpm/redhat/find-provides %__find_requires /usr/lib/rpm/redhat/find-requires From 4707ac95be01a199d575544ad03a33d934b829a9 Mon Sep 17 00:00:00 2001 From: Tim Powers Date: Sat, 14 Dec 2002 17:57:23 +0000 Subject: [PATCH 049/213] add internal dep generation macro, turn it on --- macros | 4 ++++ redhat-rpm-config.spec | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/macros b/macros index e3a4779..54634d5 100644 --- a/macros +++ b/macros @@ -129,6 +129,10 @@ export LANG\ %find_lang /usr/lib/rpm/redhat/find-lang.sh %{buildroot} +# +# use internal dep generator? +%_use_internal_dependency_generator 1 + # # Should missing %doc files terminate a build? %_missing_doc_files_terminate_build 1 diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index 001cea3..00a5e34 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -1,6 +1,6 @@ Summary: Red Hat specific rpm configuration files. Name: redhat-rpm-config -Version: 8.0.12 +Version: 8.0.13 Release: 1 License: GPL Group: Development/System From 28188548fc32289ab108d06b2d6f693da742d653 Mon Sep 17 00:00:00 2001 From: Tim Powers Date: Sat, 14 Dec 2002 18:01:21 +0000 Subject: [PATCH 050/213] forgot the changelog --- redhat-rpm-config.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index 00a5e34..d59c5d0 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -27,6 +27,9 @@ rm -rf ${RPM_BUILD_ROOT} %{_prefix}/lib/rpm/redhat %changelog +* Sat Dec 14 2002 Tim Powers 8.0.13-1 +- turn on internal rpm dep generation by default + * Fri Dec 13 2002 Elliot Lee 8.0.12-1 - New release with debug packages on From 1640cd5cac6e1308de8f303e95089053e7f5c9b5 Mon Sep 17 00:00:00 2001 From: Tim Powers Date: Sat, 14 Dec 2002 20:37:32 +0000 Subject: [PATCH 051/213] more debug macro tweaks --- macros | 9 +++------ redhat-rpm-config.spec | 6 +++++- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/macros b/macros index 54634d5..2c48c7d 100644 --- a/macros +++ b/macros @@ -92,6 +92,7 @@ %{__os_install_post}\ %{nil} + # Template for debug information sub-package. # NOTE: This is a copy from rpm to get the ifnarch noarch fix, it can be removed later %debug_package \ @@ -111,7 +112,6 @@ package or when debugging this package.\ # Bad hack to set $LANG to C during all RPM builds %prep \ -%{?_enable_debug_packages:%{debug_package}}\ %%prep\ LANG=C\ export LANG\ @@ -122,7 +122,8 @@ LANG=C\ export LANG\ %{nil} -%install %%install\ +%install %{?_enable_debug_packages:%{?buildsubdir:%{debug_package}}}\ +%%install\ LANG=C\ export LANG\ %{nil} @@ -141,9 +142,5 @@ export LANG\ # Should unpackaged files in a build root terminate a build? %_unpackaged_files_terminate_build 1 -# -# Use rpm's built in dependency generator? -%_use_internal_dependency_generator 1 - %__find_provides /usr/lib/rpm/redhat/find-provides %__find_requires /usr/lib/rpm/redhat/find-requires diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index d59c5d0..46c0c52 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -1,6 +1,6 @@ Summary: Red Hat specific rpm configuration files. Name: redhat-rpm-config -Version: 8.0.13 +Version: 8.0.14 Release: 1 License: GPL Group: Development/System @@ -27,6 +27,10 @@ rm -rf ${RPM_BUILD_ROOT} %{_prefix}/lib/rpm/redhat %changelog +* Sat Dec 14 2002 Tim Powers 8.0.14-1 +- tweak debug package stuff so that we are overloading %%install + instead of %%post + * Sat Dec 14 2002 Tim Powers 8.0.13-1 - turn on internal rpm dep generation by default From 5fbe73ed9169cc7ea2a64d5b3c3d3b4152a7ae45 Mon Sep 17 00:00:00 2001 From: Elliot Lee Date: Mon, 16 Dec 2002 18:53:55 +0000 Subject: [PATCH 052/213] 8.0.15-1 --- macros | 6 +++--- redhat-rpm-config.spec | 5 ++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/macros b/macros index 2c48c7d..9aa098b 100644 --- a/macros +++ b/macros @@ -98,14 +98,14 @@ %debug_package \ %ifnarch noarch\ %global __debug_package 1\ -%package debug\ +%package debuginfo \ Summary: Debug information for package %{name}\ Group: Development/Debug\ -%description debug\ +%description debuginfo\ This package provides debug information for package %{name}.\ Debug information is useful when developing applications that use this\ package or when debugging this package.\ -%files debug -f debugfiles.list\ +%files debuginfo -f debugfiles.list\ %defattr(-,root,root)\ %endif\ %{nil} diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index 46c0c52..eb952c1 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -1,6 +1,6 @@ Summary: Red Hat specific rpm configuration files. Name: redhat-rpm-config -Version: 8.0.14 +Version: 8.0.15 Release: 1 License: GPL Group: Development/System @@ -27,6 +27,9 @@ rm -rf ${RPM_BUILD_ROOT} %{_prefix}/lib/rpm/redhat %changelog +* Mon Dec 16 2002 Elliot Lee 8.0.15-1 +- Rename -debug subpackages to -debuginfo + * Sat Dec 14 2002 Tim Powers 8.0.14-1 - tweak debug package stuff so that we are overloading %%install instead of %%post From 89a0b75d713d23fa66b9fee671418997d2520d8b Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Tue, 17 Dec 2002 07:12:32 +0000 Subject: [PATCH 053/213] make '-g' in optflags dependent on whether or not debug_package has a value. This is Ugly(tm). --- redhat-rpm-config.spec | 5 ++- rpmrc | 80 +++++++++++++++++++++--------------------- 2 files changed, 44 insertions(+), 41 deletions(-) diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index eb952c1..9ad6a77 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -1,6 +1,6 @@ Summary: Red Hat specific rpm configuration files. Name: redhat-rpm-config -Version: 8.0.15 +Version: 8.0.16 Release: 1 License: GPL Group: Development/System @@ -27,6 +27,9 @@ rm -rf ${RPM_BUILD_ROOT} %{_prefix}/lib/rpm/redhat %changelog +* Tue Dec 17 2002 Bill Nottingham 8.0.16-1 +- make -g in rpmrc conditional on debug_package + * Mon Dec 16 2002 Elliot Lee 8.0.15-1 - Rename -debug subpackages to -debuginfo diff --git a/rpmrc b/rpmrc index 9465800..a648ebc 100644 --- a/rpmrc +++ b/rpmrc @@ -1,53 +1,53 @@ include: /usr/lib/rpm/rpmrc -optflags: i386 -O2 -march=i386 -mcpu=i686 -g -optflags: i486 -O2 -march=i486 -g -optflags: i586 -O2 -march=i586 -g -optflags: i686 -O2 -march=i686 -g -optflags: athlon -O2 -march=athlon -g -optflags: ia64 -O2 -g -optflags: x86_64 -O2 -g +optflags: i386 -O2 -march=i386 -mcpu=i686 %([ "%debug_package" != "" ] && echo "-g") +optflags: i486 -O2 -march=i486 %([ "%debug_package" != "" ] && echo "-g") +optflags: i586 -O2 -march=i586 %([ "%debug_package" != "" ] && echo "-g") +optflags: i686 -O2 -march=i686 %([ "%debug_package" != "" ] && echo "-g") +optflags: athlon -O2 -march=athlon %([ "%debug_package" != "" ] && echo "-g") +optflags: ia64 -O2 %([ "%debug_package" != "" ] && echo "-g") +optflags: x86_64 -O2 %([ "%debug_package" != "" ] && echo "-g") # XXX Please note that -mieee has been added in rpm-3.0.5. -optflags: alpha -O2 -mieee -g -optflags: alphaev5 -O2 -mieee -mcpu=ev5 -g -optflags: alphaev56 -O2 -mieee -mcpu=ev56 -g -optflags: alphapca56 -O2 -mieee -mcpu=pca56 -g -optflags: alphaev6 -O2 -mieee -mcpu=ev6 -g -optflags: alphaev67 -O2 -mieee -mcpu=ev67 -g +optflags: alpha -O2 -mieee %([ "%debug_package" != "" ] && echo "-g") +optflags: alphaev5 -O2 -mieee -mcpu=ev5 %([ "%debug_package" != "" ] && echo "-g") +optflags: alphaev56 -O2 -mieee -mcpu=ev56 %([ "%debug_package" != "" ] && echo "-g") +optflags: alphapca56 -O2 -mieee -mcpu=pca56 %([ "%debug_package" != "" ] && echo "-g") +optflags: alphaev6 -O2 -mieee -mcpu=ev6 %([ "%debug_package" != "" ] && echo "-g") +optflags: alphaev67 -O2 -mieee -mcpu=ev67 %([ "%debug_package" != "" ] && echo "-g") -optflags: sparc -O2 -m32 -mtune=ultrasparc -g -optflags: sparcv9 -O2 -m32 -mcpu=ultrasparc -g -optflags: sparc64 -O2 -m64 -mcpu=ultrasparc -g +optflags: sparc -O2 -m32 -mtune=ultrasparc %([ "%debug_package" != "" ] && echo "-g") +optflags: sparcv9 -O2 -m32 -mcpu=ultrasparc %([ "%debug_package" != "" ] && echo "-g") +optflags: sparc64 -O2 -m64 -mcpu=ultrasparc %([ "%debug_package" != "" ] && echo "-g") -optflags: m68k -O2 -fomit-frame-pointer -g +optflags: m68k -O2 -fomit-frame-pointer %([ "%debug_package" != "" ] && echo "-g") -optflags: ppc -O2 -fsigned-char -g -optflags: ppciseries -O2 -fsigned-char -g -optflags: ppcpseries -O2 -fsigned-char -g -optflags: ppc64 -O2 -fsigned-char -g +optflags: ppc -O2 -fsigned-char %([ "%debug_package" != "" ] && echo "-g") +optflags: ppciseries -O2 -fsigned-char %([ "%debug_package" != "" ] && echo "-g") +optflags: ppcpseries -O2 -fsigned-char %([ "%debug_package" != "" ] && echo "-g") +optflags: ppc64 -O2 -fsigned-char %([ "%debug_package" != "" ] && echo "-g") -optflags: parisc -O2 -mpa-risc-1-0 -g -optflags: hppa1.0 -O2 -mpa-risc-1-0 -g -optflags: hppa1.1 -O2 -mpa-risc-1-0 -g -optflags: hppa1.2 -O2 -mpa-risc-1-0 -g -optflags: hppa2.0 -O2 -mpa-risc-1-0 -g +optflags: parisc -O2 -mpa-risc-1-0 %([ "%debug_package" != "" ] && echo "-g") +optflags: hppa1.0 -O2 -mpa-risc-1-0 %([ "%debug_package" != "" ] && echo "-g") +optflags: hppa1.1 -O2 -mpa-risc-1-0 %([ "%debug_package" != "" ] && echo "-g") +optflags: hppa1.2 -O2 -mpa-risc-1-0 %([ "%debug_package" != "" ] && echo "-g") +optflags: hppa2.0 -O2 -mpa-risc-1-0 %([ "%debug_package" != "" ] && echo "-g") -optflags: mips -O2 -g -optflags: mipsel -O2 -g +optflags: mips -O2 %([ "%debug_package" != "" ] && echo "-g") +optflags: mipsel -O2 %([ "%debug_package" != "" ] && echo "-g") -optflags: armv3l -O2 -fsigned-char -fomit-frame-pointer -march=armv3 -g -optflags: armv4b -O2 -fsigned-char -fomit-frame-pointer -march=armv4 -g -optflags: armv4l -O2 -fsigned-char -fomit-frame-pointer -march=armv4 -g +optflags: armv3l -O2 -fsigned-char -fomit-frame-pointer -march=armv3 %([ "%debug_package" != "" ] && echo "-g") +optflags: armv4b -O2 -fsigned-char -fomit-frame-pointer -march=armv4 %([ "%debug_package" != "" ] && echo "-g") +optflags: armv4l -O2 -fsigned-char -fomit-frame-pointer -march=armv4 %([ "%debug_package" != "" ] && echo "-g") -optflags: atarist -O2 -fomit-frame-pointer -g -optflags: atariste -O2 -fomit-frame-pointer -g -optflags: ataritt -O2 -fomit-frame-pointer -g -optflags: falcon -O2 -fomit-frame-pointer -g -optflags: atariclone -O2 -fomit-frame-pointer -g -optflags: milan -O2 -fomit-frame-pointer -g -optflags: hades -O2 -fomit-frame-pointer -g +optflags: atarist -O2 -fomit-frame-pointer %([ "%debug_package" != "" ] && echo "-g") +optflags: atariste -O2 -fomit-frame-pointer %([ "%debug_package" != "" ] && echo "-g") +optflags: ataritt -O2 -fomit-frame-pointer %([ "%debug_package" != "" ] && echo "-g") +optflags: falcon -O2 -fomit-frame-pointer %([ "%debug_package" != "" ] && echo "-g") +optflags: atariclone -O2 -fomit-frame-pointer %([ "%debug_package" != "" ] && echo "-g") +optflags: milan -O2 -fomit-frame-pointer %([ "%debug_package" != "" ] && echo "-g") +optflags: hades -O2 -fomit-frame-pointer %([ "%debug_package" != "" ] && echo "-g") -optflags: s390 -O2 -g -optflags: s390x -O2 -g +optflags: s390 -O2 %([ "%debug_package" != "" ] && echo "-g") +optflags: s390x -O2 %([ "%debug_package" != "" ] && echo "-g") macrofiles: /usr/lib/rpm/macros:/usr/lib/rpm/%{_target}/macros:/usr/lib/rpm/redhat/macros:/etc/rpm/macros.specspo:/etc/rpm/macros.cdb:/etc/rpm/macros.prelink:/etc/rpm/macros.solve:/etc/rpm/macros.up2date:/etc/rpm/macros:/etc/rpm/%{_target}/macros:~/.rpmmacros From 3397996dd936b6e09111e5c9a0e2de83b1f85f34 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Thu, 9 Jan 2003 19:52:00 +0000 Subject: [PATCH 054/213] add brp-strip-static-archive --- brp-strip-static-archive | 16 ++++++++++++++++ macros | 1 + redhat-rpm-config.spec | 5 ++++- 3 files changed, 21 insertions(+), 1 deletion(-) create mode 100755 brp-strip-static-archive diff --git a/brp-strip-static-archive b/brp-strip-static-archive new file mode 100755 index 0000000..98d5d65 --- /dev/null +++ b/brp-strip-static-archive @@ -0,0 +1,16 @@ +#!/bin/sh + +if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ]; then + exit 0 +fi + +[ -z "$STRIP" -a -n "$1" ] && STRIP="$1" +[ -z "$STRIP" ] && STRIP=strip + +# Strip static libraries. +for f in `find $RPM_BUILD_ROOT -type f -a -exec file {} \; | \ + grep -v "^${RPM_BUILD_ROOT}/\?usr/lib/debug" | \ + grep 'current ar archive' | \ + sed -n -e 's/^\(.*\):[ ]*current ar archive/\1/p'`; do + $STRIP -g $f +done diff --git a/macros b/macros index 9aa098b..9d73673 100644 --- a/macros +++ b/macros @@ -83,6 +83,7 @@ %__os_install_post \ /usr/lib/rpm/redhat/brp-compress \ /usr/lib/rpm/redhat/brp-strip %{__strip} \ + /usr/lib/rpm/redhat/brp-strip-static-archive %{__strip} \ /usr/lib/rpm/redhat/brp-strip-comment-note %{__strip} %{__objdump} \ %{nil} diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index 9ad6a77..709f692 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -1,6 +1,6 @@ Summary: Red Hat specific rpm configuration files. Name: redhat-rpm-config -Version: 8.0.16 +Version: 8.0.17 Release: 1 License: GPL Group: Development/System @@ -27,6 +27,9 @@ rm -rf ${RPM_BUILD_ROOT} %{_prefix}/lib/rpm/redhat %changelog +* Thu Jan 9 2002 Bill Nottingham 8.0.17-1 +- add brp-strip-static-archive from rpm-4.2-0.54 + * Tue Dec 17 2002 Bill Nottingham 8.0.16-1 - make -g in rpmrc conditional on debug_package From fd6018eddb03564b16ae805c2b2524efbd2b964c Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Thu, 9 Jan 2003 19:52:24 +0000 Subject: [PATCH 055/213] happy new year --- redhat-rpm-config.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index 709f692..3c614d6 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -27,7 +27,7 @@ rm -rf ${RPM_BUILD_ROOT} %{_prefix}/lib/rpm/redhat %changelog -* Thu Jan 9 2002 Bill Nottingham 8.0.17-1 +* Thu Jan 9 2003 Bill Nottingham 8.0.17-1 - add brp-strip-static-archive from rpm-4.2-0.54 * Tue Dec 17 2002 Bill Nottingham 8.0.16-1 From 7d233e283eb7dfe405f01c6c75c9443cf76307ee Mon Sep 17 00:00:00 2001 From: Nalin Dahyabhai Date: Mon, 20 Jan 2003 20:06:50 +0000 Subject: [PATCH 056/213] add brp-implant-ident-static, which requires mktemp --- brp-implant-ident-static | 34 ++++++++++++++++++++++++++++++++++ macros | 1 + redhat-rpm-config.spec | 6 +++++- 3 files changed, 40 insertions(+), 1 deletion(-) create mode 100755 brp-implant-ident-static diff --git a/brp-implant-ident-static b/brp-implant-ident-static new file mode 100755 index 0000000..4a26cea --- /dev/null +++ b/brp-implant-ident-static @@ -0,0 +1,34 @@ +#!/bin/bash + +# If using normal root, avoid changing anything. +if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ]; then + exit 0 +fi + +tempdir=`mktemp -d /tmp/implant-ident-XXXXXX` +if test -z "$tempdir" ; then + exit 1 +fi + +cleanup() { + rm -f $tempdir/* + rmdir $tempdir +} +trap cleanup 0 1 2 3 4 5 6 7 8 9 11 13 14 15 + +for library in `find $RPM_BUILD_ROOT -type f -exec file \{\} \; | grep 'current ar archive' | sed 's,:.*,,g' ` ; do + pushd $tempdir > /dev/null + if test -n "$RPM_BUILD_ROOT" ; then + cleanedlibrary=`echo "$library" | sed s,"$RPM_BUILD_ROOT",,g` + else + cleanedlibrary="$library" + fi + ar x "$library" + for object in *.o ; do + echo '$RPM: '${RPM_PACKAGE_NAME:-UNKNOWN_NAME}-${RPM_PACKAGE_VERSION:-UNKNOWN_VERSION}-${RPM_PACKAGE_RELEASE:-UNKNOWN_RELEASE}:"$cleanedlibrary":"$object"' $' > __x_rpm_ident_string.txt + objcopy --add-section .rodata=__x_rpm_ident_string.txt "$object" + ar r "$library" "$object" + done + rm -f *.o + popd > /dev/null +done diff --git a/macros b/macros index 9d73673..a10dcd5 100644 --- a/macros +++ b/macros @@ -85,6 +85,7 @@ /usr/lib/rpm/redhat/brp-strip %{__strip} \ /usr/lib/rpm/redhat/brp-strip-static-archive %{__strip} \ /usr/lib/rpm/redhat/brp-strip-comment-note %{__strip} %{__objdump} \ + /usr/lib/rpm/redhat/brp-implant-ident-static \ %{nil} %__spec_install_post\ diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index 3c614d6..1c0422b 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -1,12 +1,13 @@ Summary: Red Hat specific rpm configuration files. Name: redhat-rpm-config -Version: 8.0.17 +Version: 8.0.18 Release: 1 License: GPL Group: Development/System Source: redhat-rpm-config-%{version}.tar.gz BuildArch: noarch #Requires: rpmbuild(VendorConfig) <= 4.1 +Requires: mktemp BuildRoot: %{_tmppath}/%{name}-root %description @@ -27,6 +28,9 @@ rm -rf ${RPM_BUILD_ROOT} %{_prefix}/lib/rpm/redhat %changelog +* Thu Jan 16 2003 Nalin Dahyabhai 8.0.18-1 +- add brp-implant-ident-static, which requires mktemp + * Thu Jan 9 2003 Bill Nottingham 8.0.17-1 - add brp-strip-static-archive from rpm-4.2-0.54 From 47b9f849d4eaa77fff73444507bb07d09b3a9d8b Mon Sep 17 00:00:00 2001 From: Elliot Lee Date: Wed, 22 Jan 2003 18:30:56 +0000 Subject: [PATCH 057/213] 8.0.19 --- macros | 3 ++- redhat-rpm-config.spec | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/macros b/macros index a10dcd5..aa130d7 100644 --- a/macros +++ b/macros @@ -85,9 +85,10 @@ /usr/lib/rpm/redhat/brp-strip %{__strip} \ /usr/lib/rpm/redhat/brp-strip-static-archive %{__strip} \ /usr/lib/rpm/redhat/brp-strip-comment-note %{__strip} %{__objdump} \ - /usr/lib/rpm/redhat/brp-implant-ident-static \ %{nil} +# /usr/lib/rpm/redhat/brp-implant-ident-static + %__spec_install_post\ %{?__debug_package:%{__debug_install_post}}\ %{__arch_install_post}\ diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index 1c0422b..dd9dba8 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -1,6 +1,6 @@ Summary: Red Hat specific rpm configuration files. Name: redhat-rpm-config -Version: 8.0.18 +Version: 8.0.19 Release: 1 License: GPL Group: Development/System @@ -28,6 +28,9 @@ rm -rf ${RPM_BUILD_ROOT} %{_prefix}/lib/rpm/redhat %changelog +* Wed Jan 22 2003 Elliot Lee 8.0.19-1 +- Disable brp-implant-ident-static until it works everywhere + * Thu Jan 16 2003 Nalin Dahyabhai 8.0.18-1 - add brp-implant-ident-static, which requires mktemp From e7eb34f0891695613ee90e6133f6684baa57443f Mon Sep 17 00:00:00 2001 From: Elliot Lee Date: Thu, 13 Feb 2003 16:33:31 +0000 Subject: [PATCH 058/213] Reorganize rpmrc/macros to set cflags in a nicer manner. --- macros | 2 ++ redhat-rpm-config.spec | 7 ++-- rpmrc | 82 +++++++++++++++++++++--------------------- 3 files changed, 48 insertions(+), 43 deletions(-) diff --git a/macros b/macros index aa130d7..0b510e5 100644 --- a/macros +++ b/macros @@ -147,3 +147,5 @@ export LANG\ %__find_provides /usr/lib/rpm/redhat/find-provides %__find_requires /usr/lib/rpm/redhat/find-requires + +%__global_cflags -O2 %{?__debug_package:-g} -pipe diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index dd9dba8..603f971 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -1,13 +1,13 @@ Summary: Red Hat specific rpm configuration files. Name: redhat-rpm-config -Version: 8.0.19 +Version: 8.0.20 Release: 1 License: GPL Group: Development/System Source: redhat-rpm-config-%{version}.tar.gz BuildArch: noarch #Requires: rpmbuild(VendorConfig) <= 4.1 -Requires: mktemp +#Requires: mktemp BuildRoot: %{_tmppath}/%{name}-root %description @@ -28,6 +28,9 @@ rm -rf ${RPM_BUILD_ROOT} %{_prefix}/lib/rpm/redhat %changelog +* Thu Feb 13 2003 Elliot Lee 8.0.20-1 +- Reorganize rpmrc/macros to set cflags in a nicer manner. + * Wed Jan 22 2003 Elliot Lee 8.0.19-1 - Disable brp-implant-ident-static until it works everywhere diff --git a/rpmrc b/rpmrc index a648ebc..c5d9e33 100644 --- a/rpmrc +++ b/rpmrc @@ -1,53 +1,53 @@ include: /usr/lib/rpm/rpmrc -optflags: i386 -O2 -march=i386 -mcpu=i686 %([ "%debug_package" != "" ] && echo "-g") -optflags: i486 -O2 -march=i486 %([ "%debug_package" != "" ] && echo "-g") -optflags: i586 -O2 -march=i586 %([ "%debug_package" != "" ] && echo "-g") -optflags: i686 -O2 -march=i686 %([ "%debug_package" != "" ] && echo "-g") -optflags: athlon -O2 -march=athlon %([ "%debug_package" != "" ] && echo "-g") -optflags: ia64 -O2 %([ "%debug_package" != "" ] && echo "-g") -optflags: x86_64 -O2 %([ "%debug_package" != "" ] && echo "-g") -# XXX Please note that -mieee has been added in rpm-3.0.5. -optflags: alpha -O2 -mieee %([ "%debug_package" != "" ] && echo "-g") -optflags: alphaev5 -O2 -mieee -mcpu=ev5 %([ "%debug_package" != "" ] && echo "-g") -optflags: alphaev56 -O2 -mieee -mcpu=ev56 %([ "%debug_package" != "" ] && echo "-g") -optflags: alphapca56 -O2 -mieee -mcpu=pca56 %([ "%debug_package" != "" ] && echo "-g") -optflags: alphaev6 -O2 -mieee -mcpu=ev6 %([ "%debug_package" != "" ] && echo "-g") -optflags: alphaev67 -O2 -mieee -mcpu=ev67 %([ "%debug_package" != "" ] && echo "-g") +optflags: i386 %{__global_cflags} -march=i386 -mcpu=i686 +optflags: i486 %{__global_cflags} -march=i486 +optflags: i586 %{__global_cflags} -march=i586 +optflags: i686 %{__global_cflags} -march=i686 +optflags: athlon %{__global_cflags} -march=athlon +optflags: ia64 %{__global_cflags} +optflags: x86_64 %{__global_cflags} -optflags: sparc -O2 -m32 -mtune=ultrasparc %([ "%debug_package" != "" ] && echo "-g") -optflags: sparcv9 -O2 -m32 -mcpu=ultrasparc %([ "%debug_package" != "" ] && echo "-g") -optflags: sparc64 -O2 -m64 -mcpu=ultrasparc %([ "%debug_package" != "" ] && echo "-g") +optflags: alpha %{__global_cflags} -mieee +optflags: alphaev5 %{__global_cflags} -mieee -mcpu=ev5 +optflags: alphaev56 %{__global_cflags} -mieee -mcpu=ev56 +optflags: alphapca56 %{__global_cflags} -mieee -mcpu=pca56 +optflags: alphaev6 %{__global_cflags} -mieee -mcpu=ev6 +optflags: alphaev67 %{__global_cflags} -mieee -mcpu=ev67 -optflags: m68k -O2 -fomit-frame-pointer %([ "%debug_package" != "" ] && echo "-g") +optflags: sparc %{__global_cflags} -m32 -mtune=ultrasparc +optflags: sparcv9 %{__global_cflags} -m32 -mcpu=ultrasparc +optflags: sparc64 %{__global_cflags} -m64 -mcpu=ultrasparc -optflags: ppc -O2 -fsigned-char %([ "%debug_package" != "" ] && echo "-g") -optflags: ppciseries -O2 -fsigned-char %([ "%debug_package" != "" ] && echo "-g") -optflags: ppcpseries -O2 -fsigned-char %([ "%debug_package" != "" ] && echo "-g") -optflags: ppc64 -O2 -fsigned-char %([ "%debug_package" != "" ] && echo "-g") +optflags: m68k %{__global_cflags} -optflags: parisc -O2 -mpa-risc-1-0 %([ "%debug_package" != "" ] && echo "-g") -optflags: hppa1.0 -O2 -mpa-risc-1-0 %([ "%debug_package" != "" ] && echo "-g") -optflags: hppa1.1 -O2 -mpa-risc-1-0 %([ "%debug_package" != "" ] && echo "-g") -optflags: hppa1.2 -O2 -mpa-risc-1-0 %([ "%debug_package" != "" ] && echo "-g") -optflags: hppa2.0 -O2 -mpa-risc-1-0 %([ "%debug_package" != "" ] && echo "-g") +optflags: ppc %{__global_cflags} -fsigned-char +optflags: ppciseries %{__global_cflags} -fsigned-char +optflags: ppcpseries %{__global_cflags} -fsigned-char +optflags: ppc64 %{__global_cflags} -fsigned-char -mminimal-toc -optflags: mips -O2 %([ "%debug_package" != "" ] && echo "-g") -optflags: mipsel -O2 %([ "%debug_package" != "" ] && echo "-g") +optflags: parisc %{__global_cflags} -mpa-risc-1-0 +optflags: hppa1.0 %{__global_cflags} -mpa-risc-1-0 +optflags: hppa1.1 %{__global_cflags} -mpa-risc-1-0 +optflags: hppa1.2 %{__global_cflags} -mpa-risc-1-0 +optflags: hppa2.0 %{__global_cflags} -mpa-risc-1-0 -optflags: armv3l -O2 -fsigned-char -fomit-frame-pointer -march=armv3 %([ "%debug_package" != "" ] && echo "-g") -optflags: armv4b -O2 -fsigned-char -fomit-frame-pointer -march=armv4 %([ "%debug_package" != "" ] && echo "-g") -optflags: armv4l -O2 -fsigned-char -fomit-frame-pointer -march=armv4 %([ "%debug_package" != "" ] && echo "-g") +optflags: mips %{__global_cflags} +optflags: mipsel %{__global_cflags} -optflags: atarist -O2 -fomit-frame-pointer %([ "%debug_package" != "" ] && echo "-g") -optflags: atariste -O2 -fomit-frame-pointer %([ "%debug_package" != "" ] && echo "-g") -optflags: ataritt -O2 -fomit-frame-pointer %([ "%debug_package" != "" ] && echo "-g") -optflags: falcon -O2 -fomit-frame-pointer %([ "%debug_package" != "" ] && echo "-g") -optflags: atariclone -O2 -fomit-frame-pointer %([ "%debug_package" != "" ] && echo "-g") -optflags: milan -O2 -fomit-frame-pointer %([ "%debug_package" != "" ] && echo "-g") -optflags: hades -O2 -fomit-frame-pointer %([ "%debug_package" != "" ] && echo "-g") +optflags: armv3l %{__global_cflags} -fsigned-char -march=armv3 +optflags: armv4b %{__global_cflags} -fsigned-char -march=armv4 +optflags: armv4l %{__global_cflags} -fsigned-char -march=armv4 -optflags: s390 -O2 %([ "%debug_package" != "" ] && echo "-g") -optflags: s390x -O2 %([ "%debug_package" != "" ] && echo "-g") +optflags: atarist %{__global_cflags} +optflags: atariste %{__global_cflags} +optflags: ataritt %{__global_cflags} +optflags: falcon %{__global_cflags} +optflags: atariclone %{__global_cflags} +optflags: milan %{__global_cflags} +optflags: hades %{__global_cflags} + +optflags: s390 %{__global_cflags} +optflags: s390x %{__global_cflags} macrofiles: /usr/lib/rpm/macros:/usr/lib/rpm/%{_target}/macros:/usr/lib/rpm/redhat/macros:/etc/rpm/macros.specspo:/etc/rpm/macros.cdb:/etc/rpm/macros.prelink:/etc/rpm/macros.solve:/etc/rpm/macros.up2date:/etc/rpm/macros:/etc/rpm/%{_target}/macros:~/.rpmmacros From ae8ce229ab77d1783cc5809ec7d8f81fa6c2a069 Mon Sep 17 00:00:00 2001 From: Elliot Lee Date: Mon, 24 Feb 2003 18:39:29 +0000 Subject: [PATCH 059/213] 8.0.21 --- macros | 2 +- redhat-rpm-config.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/macros b/macros index 0b510e5..dee5784 100644 --- a/macros +++ b/macros @@ -148,4 +148,4 @@ export LANG\ %__find_provides /usr/lib/rpm/redhat/find-provides %__find_requires /usr/lib/rpm/redhat/find-requires -%__global_cflags -O2 %{?__debug_package:-g} -pipe +%__global_cflags -O2 -g -pipe diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index 603f971..d140601 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -1,6 +1,6 @@ Summary: Red Hat specific rpm configuration files. Name: redhat-rpm-config -Version: 8.0.20 +Version: 8.0.21 Release: 1 License: GPL Group: Development/System @@ -28,6 +28,9 @@ rm -rf ${RPM_BUILD_ROOT} %{_prefix}/lib/rpm/redhat %changelog +* Mon Feb 24 2003 Elliot Lee 8.0.21-1 +- Just turn on -g unconditionally for now + * Thu Feb 13 2003 Elliot Lee 8.0.20-1 - Reorganize rpmrc/macros to set cflags in a nicer manner. From 4410abdbbbe69200ca2260ec02d53b1ba746668d Mon Sep 17 00:00:00 2001 From: Elliot Lee Date: Mon, 3 Mar 2003 16:16:20 +0000 Subject: [PATCH 060/213] Unset $DISPLAY in macros --- macros | 3 +++ redhat-rpm-config.spec | 3 +++ 2 files changed, 6 insertions(+) diff --git a/macros b/macros index dee5784..71bdbef 100644 --- a/macros +++ b/macros @@ -118,17 +118,20 @@ package or when debugging this package.\ %%prep\ LANG=C\ export LANG\ +unset DISPLAY\ %{nil} %build %%build\ LANG=C\ export LANG\ +unset DISPLAY\ %{nil} %install %{?_enable_debug_packages:%{?buildsubdir:%{debug_package}}}\ %%install\ LANG=C\ export LANG\ +unset DISPLAY\ %{nil} %find_lang /usr/lib/rpm/redhat/find-lang.sh %{buildroot} diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index d140601..c8f939b 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -28,6 +28,9 @@ rm -rf ${RPM_BUILD_ROOT} %{_prefix}/lib/rpm/redhat %changelog +* Mon Mar 03 2003 Elliot Lee +- Unset $DISPLAY in macros + * Mon Feb 24 2003 Elliot Lee 8.0.21-1 - Just turn on -g unconditionally for now From 2a08d4631885aad8d715a58dd1bfd16e888e5c6e Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 1 May 2003 08:13:14 +0000 Subject: [PATCH 061/213] - add config.guess and config.sub (2003-02-22) - make %%configure use them --- config.guess | 1388 +++++++++++++++++++++++++++++++++++++ config.sub | 1489 ++++++++++++++++++++++++++++++++++++++++ macros | 2 +- redhat-rpm-config.spec | 6 +- 4 files changed, 2883 insertions(+), 2 deletions(-) create mode 100644 config.guess create mode 100644 config.sub diff --git a/config.guess b/config.guess new file mode 100644 index 0000000..cc726cd --- /dev/null +++ b/config.guess @@ -0,0 +1,1388 @@ +#! /bin/sh +# Attempt to guess a canonical system name. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. + +timestamp='2003-02-22' + +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Originally written by Per Bothner . +# Please send patches to . Submit a context +# diff and a properly formatted ChangeLog entry. +# +# This script attempts to guess a canonical system name similar to +# config.sub. If it succeeds, it prints the system name on stdout, and +# exits with 0. Otherwise, it exits with 1. +# +# The plan is that this can be called by configure scripts if you +# don't specify an explicit build system type. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] + +Output the configuration name of the system \`$me' is run on. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.guess ($timestamp) + +Originally written by Per Bothner. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit 0 ;; + --version | -v ) + echo "$version" ; exit 0 ;; + --help | --h* | -h ) + echo "$usage"; exit 0 ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 +fi + +trap 'exit 1' 1 2 15 + +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a +# compiler to aid in system detection is discouraged as it requires +# temporary files to be created and, as you can see below, it is a +# headache to deal with in a portable fashion. + +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. + +# Portable tmp directory creation inspired by the Autoconf team. + +set_cc_for_build=' +trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; +: ${TMPDIR=/tmp} ; + { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; +dummy=$tmp/dummy ; +tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; +case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int x;" > $dummy.c ; + for c in cc gcc c89 c99 ; do + if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then + CC_FOR_BUILD="$c"; break ; + fi ; + done ; + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found ; + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; +esac ;' + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@noc.rutgers.edu 1994-08-24) +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +# Note: order is significant - the case branches are not exclusive. + +case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + *:NetBSD:*:*) + # NetBSD (nbsd) targets should (where applicable) match one or + # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # + # Note: NetBSD doesn't particularly care about the vendor + # portion of the name. We always set it to "unknown". + sysctl="sysctl -n hw.machine_arch" + UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ + /usr/sbin/$sysctl 2>/dev/null || echo unknown)` + case "${UNAME_MACHINE_ARCH}" in + armeb) machine=armeb-unknown ;; + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; + *) machine=${UNAME_MACHINE_ARCH}-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently, or will in the future. + case "${UNAME_MACHINE_ARCH}" in + arm*|i386|m68k|ns32k|sh3*|sparc|vax) + eval $set_cc_for_build + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep __ELF__ >/dev/null + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # The OS release + # Debian GNU/NetBSD machines have a different userland, and + # thus, need a distinct triplet. However, they do not need + # kernel version information, so it can be replaced with a + # suitable tag, in the style of linux-gnu. + case "${UNAME_VERSION}" in + Debian*) + release='-gnu' + ;; + *) + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + ;; + esac + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "${machine}-${os}${release}" + exit 0 ;; + amiga:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + arc:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + hp300:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mac68k:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + macppc:OpenBSD:*:*) + echo powerpc-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvme68k:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvme88k:OpenBSD:*:*) + echo m88k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvmeppc:OpenBSD:*:*) + echo powerpc-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + pmax:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + sgi:OpenBSD:*:*) + echo mipseb-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + sun3:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + wgrisc:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + *:OpenBSD:*:*) + echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + alpha:OSF1:*:*) + if test $UNAME_RELEASE = "V4.0"; then + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + fi + # According to Compaq, /usr/sbin/psrinfo has been available on + # OSF/1 and Tru64 systems produced since 1995. I hope that + # covers most systems running today. This code pipes the CPU + # types through head -n 1, so we only detect the type of CPU 0. + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` + case "$ALPHA_CPU_TYPE" in + "EV4 (21064)") + UNAME_MACHINE="alpha" ;; + "EV4.5 (21064)") + UNAME_MACHINE="alpha" ;; + "LCA4 (21066/21068)") + UNAME_MACHINE="alpha" ;; + "EV5 (21164)") + UNAME_MACHINE="alphaev5" ;; + "EV5.6 (21164A)") + UNAME_MACHINE="alphaev56" ;; + "EV5.6 (21164PC)") + UNAME_MACHINE="alphapca56" ;; + "EV5.7 (21164PC)") + UNAME_MACHINE="alphapca57" ;; + "EV6 (21264)") + UNAME_MACHINE="alphaev6" ;; + "EV6.7 (21264A)") + UNAME_MACHINE="alphaev67" ;; + "EV6.8CB (21264C)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8AL (21264B)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8CX (21264D)") + UNAME_MACHINE="alphaev68" ;; + "EV6.9A (21264/EV69A)") + UNAME_MACHINE="alphaev69" ;; + "EV7 (21364)") + UNAME_MACHINE="alphaev7" ;; + "EV7.9 (21364A)") + UNAME_MACHINE="alphaev79" ;; + esac + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + exit 0 ;; + Alpha\ *:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # Should we change UNAME_MACHINE based on the output of uname instead + # of the specific Alpha model? + echo alpha-pc-interix + exit 0 ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 + exit 0 ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-unknown-sysv4 + exit 0;; + *:[Aa]miga[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-amigaos + exit 0 ;; + *:[Mm]orph[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-morphos + exit 0 ;; + *:OS/390:*:*) + echo i370-ibm-openedition + exit 0 ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} + exit 0;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit 0;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit 0 ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit 0 ;; + DRS?6000:UNIX_SV:4.2*:7*) + case `/usr/bin/uname -p` in + sparc) echo sparc-icl-nx7 && exit 0 ;; + esac ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + i86pc:SunOS:5.*:*) + echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` + exit 0 ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos${UNAME_RELEASE} + exit 0 ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + case "`/bin/arch`" in + sun3) + echo m68k-sun-sunos${UNAME_RELEASE} + ;; + sun4) + echo sparc-sun-sunos${UNAME_RELEASE} + ;; + esac + exit 0 ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos${UNAME_RELEASE} + exit 0 ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" + # to the lowercase version "mint" (or "freemint"). Finally + # the system name "TOS" denotes a system which is actually not + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit 0 ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit 0 ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit 0 ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint${UNAME_RELEASE} + exit 0 ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint${UNAME_RELEASE} + exit 0 ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint${UNAME_RELEASE} + exit 0 ;; + powerpc:machten:*:*) + echo powerpc-apple-machten${UNAME_RELEASE} + exit 0 ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit 0 ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix${UNAME_RELEASE} + exit 0 ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix${UNAME_RELEASE} + exit 0 ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix${UNAME_RELEASE} + exit 0 ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c +#ifdef __cplusplus +#include /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c \ + && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ + && exit 0 + echo mips-mips-riscos${UNAME_RELEASE} + exit 0 ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax + exit 0 ;; + Motorola:*:4.3:PL8-*) + echo powerpc-harris-powermax + exit 0 ;; + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) + echo powerpc-harris-powermax + exit 0 ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit 0 ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 + exit 0 ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 + exit 0 ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 + exit 0 ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] + then + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ + [ ${TARGET_BINARY_INTERFACE}x = x ] + then + echo m88k-dg-dgux${UNAME_RELEASE} + else + echo m88k-dg-dguxbcs${UNAME_RELEASE} + fi + else + echo i586-dg-dgux${UNAME_RELEASE} + fi + exit 0 ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit 0 ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 + exit 0 ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 + exit 0 ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd + exit 0 ;; + *:IRIX*:*:*) + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` + exit 0 ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i*86:AIX:*:*) + echo i386-ibm-aix + exit 0 ;; + ia64:AIX:*:*) + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} + exit 0 ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 + echo rs6000-ibm-aix3.2.5 + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi + exit 0 ;; + *:AIX:*:[45]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc + fi + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${IBM_ARCH}-ibm-aix${IBM_REV} + exit 0 ;; + *:AIX:*:*) + echo rs6000-ibm-aix + exit 0 ;; + ibmrt:4.4BSD:*|romp-ibm:BSD:*) + echo romp-ibm-bsd4.4 + exit 0 ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + exit 0 ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx + exit 0 ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 + exit 0 ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd + exit 0 ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 + exit 0 ;; + 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + case "${UNAME_MACHINE}" in + 9000/31? ) HP_ARCH=m68000 ;; + 9000/[34]?? ) HP_ARCH=m68k ;; + 9000/[678][0-9][0-9]) + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH="hppa2.0n" ;; + 64) HP_ARCH="hppa2.0w" ;; + '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 + esac ;; + esac + fi + if [ "${HP_ARCH}" = "" ]; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + + #define _HPUX_SOURCE + #include + #include + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } +EOF + (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + test -z "$HP_ARCH" && HP_ARCH=hppa + fi ;; + esac + if [ ${HP_ARCH} = "hppa2.0w" ] + then + # avoid double evaluation of $set_cc_for_build + test -n "$CC_FOR_BUILD" || eval $set_cc_for_build + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null + then + HP_ARCH="hppa2.0w" + else + HP_ARCH="hppa64" + fi + fi + echo ${HP_ARCH}-hp-hpux${HPUX_REV} + exit 0 ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux${HPUX_REV} + exit 0 ;; + 3050*:HI-UX:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 + echo unknown-hitachi-hiuxwe2 + exit 0 ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + echo hppa1.1-hp-bsd + exit 0 ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit 0 ;; + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) + echo hppa1.0-hp-mpeix + exit 0 ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + echo hppa1.1-hp-osf + exit 0 ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + exit 0 ;; + i*86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo ${UNAME_MACHINE}-unknown-osf1mk + else + echo ${UNAME_MACHINE}-unknown-osf1 + fi + exit 0 ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit 0 ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd + exit 0 ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit 0 ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd + exit 0 ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd + exit 0 ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd + exit 0 ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*[A-Z]90:*:*:*) + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ + -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*T3E:*:*:*) + echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + *:UNICOS/mp:*:*) + echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit 0 ;; + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + exit 0 ;; + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi${UNAME_RELEASE} + exit 0 ;; + *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + exit 0 ;; + *:FreeBSD:*:*) + # Determine whether the default compiler uses glibc. + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + #if __GLIBC__ >= 2 + LIBC=gnu + #else + LIBC= + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} + exit 0 ;; + i*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin + exit 0 ;; + i*:MINGW*:*) + echo ${UNAME_MACHINE}-pc-mingw32 + exit 0 ;; + i*:PW*:*) + echo ${UNAME_MACHINE}-pc-pw32 + exit 0 ;; + x86:Interix*:3*) + echo i586-pc-interix3 + exit 0 ;; + [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) + echo i${UNAME_MACHINE}-pc-mks + exit 0 ;; + i*:Windows_NT*:* | Pentium*:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we + # UNAME_MACHINE based on the output of uname instead of i386? + echo i586-pc-interix + exit 0 ;; + i*:UWIN*:*) + echo ${UNAME_MACHINE}-pc-uwin + exit 0 ;; + p*:CYGWIN*:*) + echo powerpcle-unknown-cygwin + exit 0 ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + *:GNU:*:*) + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + exit 0 ;; + i*86:Minix:*:*) + echo ${UNAME_MACHINE}-pc-minix + exit 0 ;; + arm*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + ia64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + m68*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + mips:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef mips + #undef mipsel + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=mipsel + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=mips + #else + CPU= + #endif + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` + test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 + ;; + mips64:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef mips64 + #undef mips64el + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=mips64el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=mips64 + #else + CPU= + #endif + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` + test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 + ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-gnu + exit 0 ;; + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-gnu + exit 0 ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null + if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + exit 0 ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + PA7*) echo hppa1.1-unknown-linux-gnu ;; + PA8*) echo hppa2.0-unknown-linux-gnu ;; + *) echo hppa-unknown-linux-gnu ;; + esac + exit 0 ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-gnu + exit 0 ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo ${UNAME_MACHINE}-ibm-linux + exit 0 ;; + sh*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + x86_64:Linux:*:*) + echo x86_64-unknown-linux-gnu + exit 0 ;; + i*86:Linux:*:*) + # The BFD linker knows what the default object file format is, so + # first see if it will tell us. cd to the root directory to prevent + # problems with other programs or directories called `ld' in the path. + # Set LC_ALL=C to ensure ld outputs messages in English. + ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ + | sed -ne '/supported targets:/!d + s/[ ][ ]*/ /g + s/.*supported targets: *// + s/ .*// + p'` + case "$ld_supported_targets" in + elf32-i386) + TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" + ;; + a.out-i386-linux) + echo "${UNAME_MACHINE}-pc-linux-gnuaout" + exit 0 ;; + coff-i386) + echo "${UNAME_MACHINE}-pc-linux-gnucoff" + exit 0 ;; + "") + # Either a pre-BFD a.out linker (linux-gnuoldld) or + # one that does not give us useful --help. + echo "${UNAME_MACHINE}-pc-linux-gnuoldld" + exit 0 ;; + esac + # Determine whether the default compiler is a.out or elf + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + #ifdef __ELF__ + # ifdef __GLIBC__ + # if __GLIBC__ >= 2 + LIBC=gnu + # else + LIBC=gnulibc1 + # endif + # else + LIBC=gnulibc1 + # endif + #else + #ifdef __INTEL_COMPILER + LIBC=gnu + #else + LIBC=gnuaout + #endif + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` + test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 + test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 + ;; + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both + # sysname and nodename. + echo i386-sequent-sysv4 + exit 0 ;; + i*86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + exit 0 ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo ${UNAME_MACHINE}-pc-os2-emx + exit 0 ;; + i*86:XTS-300:*:STOP) + echo ${UNAME_MACHINE}-unknown-stop + exit 0 ;; + i*86:atheos:*:*) + echo ${UNAME_MACHINE}-unknown-atheos + exit 0 ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + i*86:*DOS:*:*) + echo ${UNAME_MACHINE}-pc-msdosdjgpp + exit 0 ;; + i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) + UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} + else + echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} + fi + exit 0 ;; + i*86:*:5:[78]*) + case `/bin/uname -X | grep "^Machine"` in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; + esac + echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + exit 0 ;; + i*86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ + && UNAME_MACHINE=i686 + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ + && UNAME_MACHINE=i686 + echo ${UNAME_MACHINE}-pc-sco$UNAME_REL + else + echo ${UNAME_MACHINE}-pc-sysv32 + fi + exit 0 ;; + pc:*:*:*) + # Left here for compatibility: + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i386. + echo i386-pc-msdosdjgpp + exit 0 ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit 0 ;; + paragon:*:*:*) + echo i860-intel-osf1 + exit 0 ;; + i860:*:4.*:*) # i860-SVR4 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then + echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + fi + exit 0 ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv + exit 0 ;; + mc68k:UNIX:SYSTEM5:3.51m) + echo m68k-convergent-sysv + exit 0 ;; + M680?0:D-NIX:5.3:*) + echo m68k-diab-dnix + exit 0 ;; + M68*:*:R3V[567]*:*) + test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; + 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && echo i486-ncr-sysv4.3${OS_REL} && exit 0 + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && echo i486-ncr-sysv4 && exit 0 ;; + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) + echo m68k-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit 0 ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + rs6000:LynxOS:2.*:*) + echo rs6000-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) + echo powerpc-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv${UNAME_RELEASE} + exit 0 ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 + exit 0 ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit 0 ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` + echo ${UNAME_MACHINE}-sni-sysv4 + else + echo ns32k-sni-sysv + fi + exit 0 ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit 0 ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes . + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit 0 ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 + exit 0 ;; + *:VOS:*:*) + # From Paul.Green@stratus.com. + echo hppa1.1-stratus-vos + exit 0 ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux${UNAME_RELEASE} + exit 0 ;; + news*:NEWS-OS:6*:*) + echo mips-sony-newsos6 + exit 0 ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if [ -d /usr/nec ]; then + echo mips-nec-sysv${UNAME_RELEASE} + else + echo mips-unknown-sysv${UNAME_RELEASE} + fi + exit 0 ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos + exit 0 ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos + exit 0 ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos + exit 0 ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux${UNAME_RELEASE} + exit 0 ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux${UNAME_RELEASE} + exit 0 ;; + SX-6:SUPER-UX:*:*) + echo sx6-nec-superux${UNAME_RELEASE} + exit 0 ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody${UNAME_RELEASE} + exit 0 ;; + *:Rhapsody:*:*) + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} + exit 0 ;; + *:Darwin:*:*) + case `uname -p` in + *86) UNAME_PROCESSOR=i686 ;; + powerpc) UNAME_PROCESSOR=powerpc ;; + esac + echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} + exit 0 ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + UNAME_PROCESSOR=`uname -p` + if test "$UNAME_PROCESSOR" = "x86"; then + UNAME_PROCESSOR=i386 + UNAME_MACHINE=pc + fi + echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} + exit 0 ;; + *:QNX:*:4*) + echo i386-pc-qnx + exit 0 ;; + NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk${UNAME_RELEASE} + exit 0 ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux + exit 0 ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv + exit 0 ;; + DS/*:UNIX_System_V:*:*) + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} + exit 0 ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 + # operating systems. + if test "$cputype" = "386"; then + UNAME_MACHINE=i386 + else + UNAME_MACHINE="$cputype" + fi + echo ${UNAME_MACHINE}-unknown-plan9 + exit 0 ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 + exit 0 ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex + exit 0 ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 + exit 0 ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 + exit 0 ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 + exit 0 ;; + *:ITS:*:*) + echo pdp10-unknown-its + exit 0 ;; +esac + +#echo '(No uname command or uname output not recognized.)' 1>&2 +#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 + +eval $set_cc_for_build +cat >$dummy.c < +# include +#endif +main () +{ +#if defined (sony) +#if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); +#else +#include + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); +#endif +#endif + +#if defined (__arm) && defined (__acorn) && defined (__unix) + printf ("arm-acorn-riscix"); exit (0); +#endif + +#if defined (hp300) && !defined (hpux) + printf ("m68k-hp-bsd\n"); exit (0); +#endif + +#if defined (NeXT) +#if !defined (__ARCHITECTURE__) +#define __ARCHITECTURE__ "m68k" +#endif + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); + exit (0); +#endif + +#if defined (MULTIMAX) || defined (n16) +#if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); +#else +#if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); +#else + printf ("ns32k-encore-bsd\n"); exit (0); +#endif +#endif +#endif + +#if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); +#endif + +#if defined (sequent) +#if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); +#endif +#if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); +#endif +#endif + +#if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); + +#endif + +#if defined (vax) +# if !defined (ultrix) +# include +# if defined (BSD) +# if BSD == 43 + printf ("vax-dec-bsd4.3\n"); exit (0); +# else +# if BSD == 199006 + printf ("vax-dec-bsd4.3reno\n"); exit (0); +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# endif +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# else + printf ("vax-dec-ultrix\n"); exit (0); +# endif +#endif + +#if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); +#endif + + exit (1); +} +EOF + +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0 + +# Apollos put the system type in the environment. + +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } + +# Convex versions that predate uname can use getsysinfo(1) + +if [ -x /usr/convex/getsysinfo ] +then + case `getsysinfo -f cpu_type` in + c1*) + echo c1-convex-bsd + exit 0 ;; + c2*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit 0 ;; + c34*) + echo c34-convex-bsd + exit 0 ;; + c38*) + echo c38-convex-bsd + exit 0 ;; + c4*) + echo c4-convex-bsd + exit 0 ;; + esac +fi + +cat >&2 < in order to provide the needed +information to handle your system. + +config.guess timestamp = $timestamp + +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` + +hostinfo = `(hostinfo) 2>/dev/null` +/bin/universe = `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch = `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` + +UNAME_MACHINE = ${UNAME_MACHINE} +UNAME_RELEASE = ${UNAME_RELEASE} +UNAME_SYSTEM = ${UNAME_SYSTEM} +UNAME_VERSION = ${UNAME_VERSION} +EOF + +exit 1 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/config.sub b/config.sub new file mode 100644 index 0000000..9772e87 --- /dev/null +++ b/config.sub @@ -0,0 +1,1489 @@ +#! /bin/sh +# Configuration validation subroutine script. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. + +timestamp='2003-02-22' + +# This file is (in principle) common to ALL GNU software. +# The presence of a machine in this file suggests that SOME GNU software +# can handle that machine. It does not imply ALL GNU software can. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Please send patches to . Submit a context +# diff and a properly formatted ChangeLog entry. +# +# Configuration subroutine to validate and canonicalize a configuration type. +# Supply the specified configuration type as an argument. +# If it is invalid, we print an error message on stderr and exit with code 1. +# Otherwise, we print the canonical config type on stdout and succeed. + +# This file is supposed to be the same for all GNU packages +# and recognize all the CPU types, system types and aliases +# that are meaningful with *any* GNU software. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] CPU-MFR-OPSYS + $0 [OPTION] ALIAS + +Canonicalize a configuration name. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.sub ($timestamp) + +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit 0 ;; + --version | -v ) + echo "$version" ; exit 0 ;; + --help | --h* | -h ) + echo "$usage"; exit 0 ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" + exit 1 ;; + + *local*) + # First pass through any local machine types. + echo $1 + exit 0;; + + * ) + break ;; + esac +done + +case $# in + 0) echo "$me: missing argument$help" >&2 + exit 1;; + 1) ;; + *) echo "$me: too many arguments$help" >&2 + exit 1;; +esac + +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). +# Here we must recognize all the valid KERNEL-OS combinations. +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` +case $maybe_os in + nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; + *) + basic_machine=`echo $1 | sed 's/-[^-]*$//'` + if [ $basic_machine != $1 ] + then os=`echo $1 | sed 's/.*-/-/'` + else os=; fi + ;; +esac + +### Let's recognize common machines as not being operating systems so +### that things like config.sub decstation-3100 work. We also +### recognize some manufacturers as not being operating systems, so we +### can provide default operating systems below. +case $os in + -sun*os*) + # Prevent following clause from handling this invalid input. + ;; + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ + -apple | -axis) + os= + basic_machine=$1 + ;; + -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 + ;; + -scout) + ;; + -wrs) + os=-vxworks + basic_machine=$1 + ;; + -chorusos*) + os=-chorusos + basic_machine=$1 + ;; + -chorusrdb) + os=-chorusrdb + basic_machine=$1 + ;; + -hiux*) + os=-hiuxwe2 + ;; + -sco5) + os=-sco3.2v5 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco4) + os=-sco3.2v4 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2v[4-9]*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco*) + os=-sco3.2v2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -udk*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -isc) + os=-isc2.2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -clix*) + basic_machine=clipper-intergraph + ;; + -isc*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -lynx*) + os=-lynxos + ;; + -ptx*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` + ;; + -windowsnt*) + os=`echo $os | sed -e 's/windowsnt/winnt/'` + ;; + -psos*) + os=-psos + ;; + -mint | -mint[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; +esac + +# Decode aliases for certain CPU-COMPANY combinations. +case $basic_machine in + # Recognize the basic CPU types without company name. + # Some are omitted here because they have special meanings below. + 1750a | 580 \ + | a29k \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ + | clipper \ + | d10v | d30v | dlx | dsp16xx \ + | fr30 | frv \ + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | i370 | i860 | i960 | ia64 \ + | ip2k \ + | m32r | m68000 | m68k | m88k | mcore \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ + | mips64vr | mips64vrel \ + | mips64orion | mips64orionel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipstx39 | mipstx39el \ + | mn10200 | mn10300 \ + | msp430 \ + | ns16k | ns32k \ + | openrisc | or32 \ + | pdp10 | pdp11 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ + | pyramid \ + | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ + | sh64 | sh64le \ + | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \ + | strongarm \ + | tahoe | thumb | tic80 | tron \ + | v850 | v850e \ + | we32k \ + | x86 | xscale | xstormy16 | xtensa \ + | z8k) + basic_machine=$basic_machine-unknown + ;; + m6811 | m68hc11 | m6812 | m68hc12) + # Motorola 68HC11/12. + basic_machine=$basic_machine-unknown + os=-none + ;; + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) + ;; + + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and + # (2) the word "unknown" tends to confuse beginning users. + i*86 | x86_64) + basic_machine=$basic_machine-pc + ;; + # Object if more than one company name word. + *-*-*) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; + # Recognize the basic CPU types with company name. + 580-* \ + | a29k-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ + | avr-* \ + | bs2000-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ + | clipper-* | cydra-* \ + | d10v-* | d30v-* | dlx-* \ + | elxsi-* \ + | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ + | h8300-* | h8500-* \ + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | i*86-* | i860-* | i960-* | ia64-* \ + | ip2k-* \ + | m32r-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ + | m88110-* | m88k-* | mcore-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ + | mips64vr-* | mips64vrel-* \ + | mips64orion-* | mips64orionel-* \ + | mips64vr4100-* | mips64vr4100el-* \ + | mips64vr4300-* | mips64vr4300el-* \ + | mips64vr5000-* | mips64vr5000el-* \ + | mipsisa32-* | mipsisa32el-* \ + | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa64-* | mipsisa64el-* \ + | mipsisa64sb1-* | mipsisa64sb1el-* \ + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipstx39-* | mipstx39el-* \ + | msp430-* \ + | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ + | pyramid-* \ + | romp-* | rs6000-* \ + | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ + | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ + | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ + | tahoe-* | thumb-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tron-* \ + | v850-* | v850e-* | vax-* \ + | we32k-* \ + | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \ + | xtensa-* \ + | ymp-* \ + | z8k-*) + ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 386bsd) + basic_machine=i386-unknown + os=-bsd + ;; + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + basic_machine=m68000-att + ;; + 3b*) + basic_machine=we32k-att + ;; + a29khif) + basic_machine=a29k-amd + os=-udi + ;; + adobe68k) + basic_machine=m68010-adobe + os=-scout + ;; + alliant | fx80) + basic_machine=fx80-alliant + ;; + altos | altos3068) + basic_machine=m68k-altos + ;; + am29k) + basic_machine=a29k-none + os=-bsd + ;; + amdahl) + basic_machine=580-amdahl + os=-sysv + ;; + amiga | amiga-*) + basic_machine=m68k-unknown + ;; + amigaos | amigados) + basic_machine=m68k-unknown + os=-amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + os=-sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=-sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + os=-bsd + ;; + aux) + basic_machine=m68k-apple + os=-aux + ;; + balance) + basic_machine=ns32k-sequent + os=-dynix + ;; + c90) + basic_machine=c90-cray + os=-unicos + ;; + convex-c1) + basic_machine=c1-convex + os=-bsd + ;; + convex-c2) + basic_machine=c2-convex + os=-bsd + ;; + convex-c32) + basic_machine=c32-convex + os=-bsd + ;; + convex-c34) + basic_machine=c34-convex + os=-bsd + ;; + convex-c38) + basic_machine=c38-convex + os=-bsd + ;; + cray | j90) + basic_machine=j90-cray + os=-unicos + ;; + crds | unos) + basic_machine=m68k-crds + ;; + cris | cris-* | etrax*) + basic_machine=cris-axis + ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) + basic_machine=mips-dec + ;; + decsystem10* | dec10*) + basic_machine=pdp10-dec + os=-tops10 + ;; + decsystem20* | dec20*) + basic_machine=pdp10-dec + os=-tops20 + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + basic_machine=m68k-motorola + ;; + delta88) + basic_machine=m88k-motorola + os=-sysv3 + ;; + dpx20 | dpx20-*) + basic_machine=rs6000-bull + os=-bosx + ;; + dpx2* | dpx2*-bull) + basic_machine=m68k-bull + os=-sysv3 + ;; + ebmon29k) + basic_machine=a29k-amd + os=-ebmon + ;; + elxsi) + basic_machine=elxsi-elxsi + os=-bsd + ;; + encore | umax | mmax) + basic_machine=ns32k-encore + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=-ose + ;; + fx2800) + basic_machine=i860-alliant + ;; + genix) + basic_machine=ns32k-ns + ;; + gmicro) + basic_machine=tron-gmicro + os=-sysv + ;; + go32) + basic_machine=i386-pc + os=-go32 + ;; + h3050r* | hiux*) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=-hms + ;; + h8300xray) + basic_machine=h8300-hitachi + os=-xray + ;; + h8500hms) + basic_machine=h8500-hitachi + os=-hms + ;; + harris) + basic_machine=m88k-harris + os=-sysv3 + ;; + hp300-*) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=-bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=-hpux + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + basic_machine=m68000-hp + ;; + hp9k3[2-9][0-9]) + basic_machine=m68k-hp + ;; + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + basic_machine=hppa1.1-hp + ;; + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hppa-next) + os=-nextstep3 + ;; + hppaosf) + basic_machine=hppa1.1-hp + os=-osf + ;; + hppro) + basic_machine=hppa1.1-hp + os=-proelf + ;; + i370-ibm* | ibm*) + basic_machine=i370-ibm + ;; +# I'm not sure what "Sysv32" means. Should this be sysv3.2? + i*86v32) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv32 + ;; + i*86v4*) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv4 + ;; + i*86v) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv + ;; + i*86sol2) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-solaris2 + ;; + i386mach) + basic_machine=i386-mach + os=-mach + ;; + i386-vsta | vsta) + basic_machine=i386-unknown + os=-vsta + ;; + iris | iris4d) + basic_machine=mips-sgi + case $os in + -irix*) + ;; + *) + os=-irix4 + ;; + esac + ;; + isi68 | isi) + basic_machine=m68k-isi + os=-sysv + ;; + m88k-omron*) + basic_machine=m88k-omron + ;; + magnum | m3230) + basic_machine=mips-mips + os=-sysv + ;; + merlin) + basic_machine=ns32k-utek + os=-sysv + ;; + mingw32) + basic_machine=i386-pc + os=-mingw32 + ;; + miniframe) + basic_machine=m68000-convergent + ;; + *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; + mips3*-*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` + ;; + mips3*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown + ;; + mmix*) + basic_machine=mmix-knuth + os=-mmixware + ;; + monitor) + basic_machine=m68k-rom68k + os=-coff + ;; + morphos) + basic_machine=powerpc-unknown + os=-morphos + ;; + msdos) + basic_machine=i386-pc + os=-msdos + ;; + mvs) + basic_machine=i370-ibm + os=-mvs + ;; + ncr3000) + basic_machine=i486-ncr + os=-sysv4 + ;; + netbsd386) + basic_machine=i386-unknown + os=-netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + os=-linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=-newsos + ;; + news1000) + basic_machine=m68030-sony + os=-newsos + ;; + news-3600 | risc-news) + basic_machine=mips-sony + os=-newsos + ;; + necv70) + basic_machine=v70-nec + os=-sysv + ;; + next | m*-next ) + basic_machine=m68k-next + case $os in + -nextstep* ) + ;; + -ns2*) + os=-nextstep2 + ;; + *) + os=-nextstep3 + ;; + esac + ;; + nh3000) + basic_machine=m68k-harris + os=-cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=-cxux + ;; + nindy960) + basic_machine=i960-intel + os=-nindy + ;; + mon960) + basic_machine=i960-intel + os=-mon960 + ;; + nonstopux) + basic_machine=mips-compaq + os=-nonstopux + ;; + np1) + basic_machine=np1-gould + ;; + nv1) + basic_machine=nv1-cray + os=-unicosmp + ;; + nsr-tandem) + basic_machine=nsr-tandem + ;; + op50n-* | op60c-*) + basic_machine=hppa1.1-oki + os=-proelf + ;; + or32 | or32-*) + basic_machine=or32-unknown + os=-coff + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=-ose + ;; + os68k) + basic_machine=m68k-none + os=-os68k + ;; + pa-hitachi) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + paragon) + basic_machine=i860-intel + os=-osf + ;; + pbd) + basic_machine=sparc-tti + ;; + pbb) + basic_machine=m68k-tti + ;; + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; + pentium | p5 | k5 | k6 | nexgen | viac3) + basic_machine=i586-pc + ;; + pentiumpro | p6 | 6x86 | athlon | athlon_*) + basic_machine=i686-pc + ;; + pentiumii | pentium2) + basic_machine=i686-pc + ;; + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) + basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumpro-* | p6-* | 6x86-* | athlon-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumii-* | pentium2-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pn) + basic_machine=pn-gould + ;; + power) basic_machine=power-ibm + ;; + ppc) basic_machine=powerpc-unknown + ;; + ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppcle | powerpclittle | ppc-le | powerpc-little) + basic_machine=powerpcle-unknown + ;; + ppcle-* | powerpclittle-*) + basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64) basic_machine=powerpc64-unknown + ;; + ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64le | powerpc64little | ppc64-le | powerpc64-little) + basic_machine=powerpc64le-unknown + ;; + ppc64le-* | powerpc64little-*) + basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ps2) + basic_machine=i386-ibm + ;; + pw32) + basic_machine=i586-unknown + os=-pw32 + ;; + rom68k) + basic_machine=m68k-rom68k + os=-coff + ;; + rm[46]00) + basic_machine=mips-siemens + ;; + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; + s390 | s390-*) + basic_machine=s390-ibm + ;; + s390x | s390x-*) + basic_machine=s390x-ibm + ;; + sa29200) + basic_machine=a29k-amd + os=-udi + ;; + sb1) + basic_machine=mipsisa64sb1-unknown + ;; + sb1el) + basic_machine=mipsisa64sb1el-unknown + ;; + sequent) + basic_machine=i386-sequent + ;; + sh) + basic_machine=sh-hitachi + os=-hms + ;; + sparclite-wrs | simso-wrs) + basic_machine=sparclite-wrs + os=-vxworks + ;; + sps7) + basic_machine=m68k-bull + os=-sysv2 + ;; + spur) + basic_machine=spur-unknown + ;; + st2000) + basic_machine=m68k-tandem + ;; + stratus) + basic_machine=i860-stratus + os=-sysv4 + ;; + sun2) + basic_machine=m68000-sun + ;; + sun2os3) + basic_machine=m68000-sun + os=-sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=-sunos4 + ;; + sun3os3) + basic_machine=m68k-sun + os=-sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=-sunos4 + ;; + sun4os3) + basic_machine=sparc-sun + os=-sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=-sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=-solaris2 + ;; + sun3 | sun3-*) + basic_machine=m68k-sun + ;; + sun4) + basic_machine=sparc-sun + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + ;; + sv1) + basic_machine=sv1-cray + os=-unicos + ;; + symmetry) + basic_machine=i386-sequent + os=-dynix + ;; + t3e) + basic_machine=alphaev5-cray + os=-unicos + ;; + t90) + basic_machine=t90-cray + os=-unicos + ;; + tic4x | c4x*) + basic_machine=tic4x-unknown + os=-coff + ;; + tic54x | c54x*) + basic_machine=tic54x-unknown + os=-coff + ;; + tic55x | c55x*) + basic_machine=tic55x-unknown + os=-coff + ;; + tic6x | c6x*) + basic_machine=tic6x-unknown + os=-coff + ;; + tx39) + basic_machine=mipstx39-unknown + ;; + tx39el) + basic_machine=mipstx39el-unknown + ;; + toad1) + basic_machine=pdp10-xkl + os=-tops20 + ;; + tower | tower-32) + basic_machine=m68k-ncr + ;; + udi29k) + basic_machine=a29k-amd + os=-udi + ;; + ultra3) + basic_machine=a29k-nyu + os=-sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + os=-none + ;; + vaxv) + basic_machine=vax-dec + os=-sysv + ;; + vms) + basic_machine=vax-dec + os=-vms + ;; + vpp*|vx|vx-*) + basic_machine=f301-fujitsu + ;; + vxworks960) + basic_machine=i960-wrs + os=-vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=-vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=-vxworks + ;; + w65*) + basic_machine=w65-wdc + os=-none + ;; + w89k-*) + basic_machine=hppa1.1-winbond + os=-proelf + ;; + xps | xps100) + basic_machine=xps100-honeywell + ;; + ymp) + basic_machine=ymp-cray + os=-unicos + ;; + z8k-*-coff) + basic_machine=z8k-unknown + os=-sim + ;; + none) + basic_machine=none-none + os=-none + ;; + +# Here we handle the default manufacturer of certain CPU types. It is in +# some cases the only manufacturer, in others, it is the most popular. + w89k) + basic_machine=hppa1.1-winbond + ;; + op50n) + basic_machine=hppa1.1-oki + ;; + op60c) + basic_machine=hppa1.1-oki + ;; + romp) + basic_machine=romp-ibm + ;; + rs6000) + basic_machine=rs6000-ibm + ;; + vax) + basic_machine=vax-dec + ;; + pdp10) + # there are many clones, so DEC is not a safe bet + basic_machine=pdp10-unknown + ;; + pdp11) + basic_machine=pdp11-dec + ;; + we32k) + basic_machine=we32k-att + ;; + sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) + basic_machine=sh-unknown + ;; + sh64) + basic_machine=sh64-unknown + ;; + sparc | sparcv9 | sparcv9b) + basic_machine=sparc-sun + ;; + cydra) + basic_machine=cydra-cydrome + ;; + orion) + basic_machine=orion-highlevel + ;; + orion105) + basic_machine=clipper-highlevel + ;; + mac | mpw | mac-mpw) + basic_machine=m68k-apple + ;; + pmac | pmac-mpw) + basic_machine=powerpc-apple + ;; + *-unknown) + # Make sure to match an already-canonicalized machine name. + ;; + *) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; +esac + +# Here we canonicalize certain aliases for manufacturers. +case $basic_machine in + *-digital*) + basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` + ;; + *-commodore*) + basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` + ;; + *) + ;; +esac + +# Decode manufacturer-specific aliases for certain operating systems. + +if [ x"$os" != x"" ] +then +case $os in + # First match some system type aliases + # that might get confused with valid system types. + # -solaris* is a basic system type, with this one exception. + -solaris1 | -solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; + -solaris) + os=-solaris2 + ;; + -svr4*) + os=-sysv4 + ;; + -unixware*) + os=-sysv4.2uw + ;; + -gnu/linux*) + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` + ;; + # First accept the basic system types. + # The portable systems comes first. + # Each alternative MUST END IN A *, to match a version number. + # -sysv* is not here because it comes later, after sysvr4. + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ + | -aos* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ + | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -chorusos* | -chorusrdb* \ + | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ + | -powermax* | -dnix*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -qnx*) + case $basic_machine in + x86-* | i*86-*) + ;; + *) + os=-nto$os + ;; + esac + ;; + -nto-qnx*) + ;; + -nto*) + os=`echo $os | sed -e 's|nto|nto-qnx|'` + ;; + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ + | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) + ;; + -mac*) + os=`echo $os | sed -e 's|mac|macos|'` + ;; + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; + -sunos5*) + os=`echo $os | sed -e 's|sunos5|solaris2|'` + ;; + -sunos6*) + os=`echo $os | sed -e 's|sunos6|solaris3|'` + ;; + -opened*) + os=-openedition + ;; + -wince*) + os=-wince + ;; + -osfrose*) + os=-osfrose + ;; + -osf*) + os=-osf + ;; + -utek*) + os=-bsd + ;; + -dynix*) + os=-bsd + ;; + -acis*) + os=-aos + ;; + -atheos*) + os=-atheos + ;; + -386bsd) + os=-bsd + ;; + -ctix* | -uts*) + os=-sysv + ;; + -nova*) + os=-rtmk-nova + ;; + -ns2 ) + os=-nextstep2 + ;; + -nsk*) + os=-nsk + ;; + # Preserve the version number of sinix5. + -sinix5.*) + os=`echo $os | sed -e 's|sinix|sysv|'` + ;; + -sinix*) + os=-sysv4 + ;; + -triton*) + os=-sysv3 + ;; + -oss*) + os=-sysv3 + ;; + -svr4) + os=-sysv4 + ;; + -svr3) + os=-sysv3 + ;; + -sysvr4) + os=-sysv4 + ;; + # This must come after -sysvr4. + -sysv*) + ;; + -ose*) + os=-ose + ;; + -es1800*) + os=-ose + ;; + -xenix) + os=-xenix + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + os=-mint + ;; + -aros*) + os=-aros + ;; + -kaos*) + os=-kaos + ;; + -none) + ;; + *) + # Get rid of the `-' at the beginning of $os. + os=`echo $os | sed 's/[^-]*-//'` + echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 + exit 1 + ;; +esac +else + +# Here we handle the default operating systems that come with various machines. +# The value should be what the vendor currently ships out the door with their +# machine or put another way, the most popular os provided with the machine. + +# Note that if you're going to try to match "-MANUFACTURER" here (say, +# "-sun"), then you have to tell the case statement up towards the top +# that MANUFACTURER isn't an operating system. Otherwise, code above +# will signal an error saying that MANUFACTURER isn't an operating +# system, and we'll never get to this point. + +case $basic_machine in + *-acorn) + os=-riscix1.2 + ;; + arm*-rebel) + os=-linux + ;; + arm*-semi) + os=-aout + ;; + # This must come before the *-dec entry. + pdp10-*) + os=-tops20 + ;; + pdp11-*) + os=-none + ;; + *-dec | vax-*) + os=-ultrix4.2 + ;; + m68*-apollo) + os=-domain + ;; + i386-sun) + os=-sunos4.0.2 + ;; + m68000-sun) + os=-sunos3 + # This also exists in the configure program, but was not the + # default. + # os=-sunos4 + ;; + m68*-cisco) + os=-aout + ;; + mips*-cisco) + os=-elf + ;; + mips*-*) + os=-elf + ;; + or32-*) + os=-coff + ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=-sysv3 + ;; + sparc-* | *-sun) + os=-sunos4.1.1 + ;; + *-be) + os=-beos + ;; + *-ibm) + os=-aix + ;; + *-wec) + os=-proelf + ;; + *-winbond) + os=-proelf + ;; + *-oki) + os=-proelf + ;; + *-hp) + os=-hpux + ;; + *-hitachi) + os=-hiux + ;; + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) + os=-sysv + ;; + *-cbm) + os=-amigaos + ;; + *-dg) + os=-dgux + ;; + *-dolphin) + os=-sysv3 + ;; + m68k-ccur) + os=-rtu + ;; + m88k-omron*) + os=-luna + ;; + *-next ) + os=-nextstep + ;; + *-sequent) + os=-ptx + ;; + *-crds) + os=-unos + ;; + *-ns) + os=-genix + ;; + i370-*) + os=-mvs + ;; + *-next) + os=-nextstep3 + ;; + *-gould) + os=-sysv + ;; + *-highlevel) + os=-bsd + ;; + *-encore) + os=-bsd + ;; + *-sgi) + os=-irix + ;; + *-siemens) + os=-sysv4 + ;; + *-masscomp) + os=-rtu + ;; + f30[01]-fujitsu | f700-fujitsu) + os=-uxpv + ;; + *-rom68k) + os=-coff + ;; + *-*bug) + os=-coff + ;; + *-apple) + os=-macos + ;; + *-atari*) + os=-mint + ;; + *) + os=-none + ;; +esac +fi + +# Here we handle the case where we know the os, and the CPU type, but not the +# manufacturer. We pick the logical manufacturer. +vendor=unknown +case $basic_machine in + *-unknown) + case $os in + -riscix*) + vendor=acorn + ;; + -sunos*) + vendor=sun + ;; + -aix*) + vendor=ibm + ;; + -beos*) + vendor=be + ;; + -hpux*) + vendor=hp + ;; + -mpeix*) + vendor=hp + ;; + -hiux*) + vendor=hitachi + ;; + -unos*) + vendor=crds + ;; + -dgux*) + vendor=dg + ;; + -luna*) + vendor=omron + ;; + -genix*) + vendor=ns + ;; + -mvs* | -opened*) + vendor=ibm + ;; + -ptx*) + vendor=sequent + ;; + -vxsim* | -vxworks* | -windiss*) + vendor=wrs + ;; + -aux*) + vendor=apple + ;; + -hms*) + vendor=hitachi + ;; + -mpw* | -macos*) + vendor=apple + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + vendor=atari + ;; + -vos*) + vendor=stratus + ;; + esac + basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` + ;; +esac + +echo $basic_machine$os +exit 0 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/macros b/macros index 71bdbef..04a3640 100644 --- a/macros +++ b/macros @@ -31,7 +31,7 @@ CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \ FFLAGS="${FFLAGS:-%optflags}" ; export FFLAGS ; \ for i in $(find . -name config.guess 2>/dev/null) $(find . -name config.sub 2>/dev/null) ; do \ - [ -f /usr/share/libtool/$(basename $i) ] && %{__rm} -f $i && %{__cp} -fv /usr/share/libtool/$(basename $i) $i ; \ + [ -f /usr/lib/rpm/redhat/$(basename $i) ] && %{__rm} -f $i && %{__cp} -fv /usr/lib/rpm/redhat/$(basename $i) $i ; \ done ; \ ./configure --host=%{_host} --build=%{_build} \\\ --target=%{_target_platform} \\\ diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index c8f939b..dbb1444 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -1,6 +1,6 @@ Summary: Red Hat specific rpm configuration files. Name: redhat-rpm-config -Version: 8.0.21 +Version: 8.0.22 Release: 1 License: GPL Group: Development/System @@ -28,6 +28,10 @@ rm -rf ${RPM_BUILD_ROOT} %{_prefix}/lib/rpm/redhat %changelog +* Thu May 1 2003 Jens Petersen - 8.0.22-1 +- add config.guess and config.sub (2003-02-22) with s390 patch on config.sub +- make %%configure use them + * Mon Mar 03 2003 Elliot Lee - Unset $DISPLAY in macros From 1688b1245423162342c1faaba19d43b48332d681 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 1 May 2003 08:19:29 +0000 Subject: [PATCH 062/213] 8.0.22-1 - apply s390 patch to config.sub --- config.sub | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/config.sub b/config.sub index 9772e87..1589de7 100644 --- a/config.sub +++ b/config.sub @@ -257,6 +257,7 @@ case $basic_machine in | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ + | s390 | s390x \ | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \ @@ -329,6 +330,7 @@ case $basic_machine in | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ + | s390-* | s390x-* \ | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ @@ -822,12 +824,6 @@ case $basic_machine in rtpc | rtpc-*) basic_machine=romp-ibm ;; - s390 | s390-*) - basic_machine=s390-ibm - ;; - s390x | s390x-*) - basic_machine=s390x-ibm - ;; sa29200) basic_machine=a29k-amd os=-udi From 0a7adcf3755a24897a74213a7bc87e99aa5ac1a2 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 1 May 2003 12:27:40 +0000 Subject: [PATCH 063/213] 8.0.22-2 for Taroon --- redhat-rpm-config.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index dbb1444..28f7165 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -1,7 +1,7 @@ Summary: Red Hat specific rpm configuration files. Name: redhat-rpm-config Version: 8.0.22 -Release: 1 +Release: 2 License: GPL Group: Development/System Source: redhat-rpm-config-%{version}.tar.gz @@ -28,7 +28,7 @@ rm -rf ${RPM_BUILD_ROOT} %{_prefix}/lib/rpm/redhat %changelog -* Thu May 1 2003 Jens Petersen - 8.0.22-1 +* Thu May 1 2003 Jens Petersen - 8.0.22-2 - add config.guess and config.sub (2003-02-22) with s390 patch on config.sub - make %%configure use them From 3f7f45e72adf246accf1dc403d62357f9a59dfc8 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 2 May 2003 09:27:06 +0000 Subject: [PATCH 064/213] 8.0.23-1 - make config.{guess,sub} executable --- redhat-rpm-config.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index 28f7165..3ed2a69 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -1,7 +1,7 @@ Summary: Red Hat specific rpm configuration files. Name: redhat-rpm-config -Version: 8.0.22 -Release: 2 +Version: 8.0.23 +Release: 1 License: GPL Group: Development/System Source: redhat-rpm-config-%{version}.tar.gz @@ -28,6 +28,9 @@ rm -rf ${RPM_BUILD_ROOT} %{_prefix}/lib/rpm/redhat %changelog +* Fri May 2 2003 Jens Petersen - 8.0.23-1 +- make config.{guess,sub} executable + * Thu May 1 2003 Jens Petersen - 8.0.22-2 - add config.guess and config.sub (2003-02-22) with s390 patch on config.sub - make %%configure use them From 7bd518af03088f8f2981561de0eced096b8f80ff Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 2 May 2003 09:41:17 +0000 Subject: [PATCH 065/213] Up the release. --- redhat-rpm-config.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index 3ed2a69..f9f64f6 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -1,7 +1,7 @@ Summary: Red Hat specific rpm configuration files. Name: redhat-rpm-config Version: 8.0.23 -Release: 1 +Release: 2 License: GPL Group: Development/System Source: redhat-rpm-config-%{version}.tar.gz From b14b80a9807f93b0f053decc287b5cc710ce9f8d Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 2 May 2003 09:48:05 +0000 Subject: [PATCH 066/213] Remove non-executable config.{sub,guess}. --- config.guess | 1388 ---------------------------------------------- config.sub | 1485 -------------------------------------------------- 2 files changed, 2873 deletions(-) delete mode 100644 config.guess delete mode 100644 config.sub diff --git a/config.guess b/config.guess deleted file mode 100644 index cc726cd..0000000 --- a/config.guess +++ /dev/null @@ -1,1388 +0,0 @@ -#! /bin/sh -# Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. - -timestamp='2003-02-22' - -# This file is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# Originally written by Per Bothner . -# Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. -# -# This script attempts to guess a canonical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it exits with 1. -# -# The plan is that this can be called by configure scripts if you -# don't specify an explicit build system type. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] - -Output the configuration name of the system \`$me' is run on. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.guess ($timestamp) - -Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 -Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit 0 ;; - --version | -v ) - echo "$version" ; exit 0 ;; - --help | --h* | -h ) - echo "$usage"; exit 0 ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" >&2 - exit 1 ;; - * ) - break ;; - esac -done - -if test $# != 0; then - echo "$me: too many arguments$help" >&2 - exit 1 -fi - -trap 'exit 1' 1 2 15 - -# CC_FOR_BUILD -- compiler used by this script. Note that the use of a -# compiler to aid in system detection is discouraged as it requires -# temporary files to be created and, as you can see below, it is a -# headache to deal with in a portable fashion. - -# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still -# use `HOST_CC' if defined, but it is deprecated. - -# Portable tmp directory creation inspired by the Autoconf team. - -set_cc_for_build=' -trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; -trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; -: ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; -dummy=$tmp/dummy ; -tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; -case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > $dummy.c ; - for c in cc gcc c89 c99 ; do - if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then - CC_FOR_BUILD="$c"; break ; - fi ; - done ; - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found ; - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ;' - -# This is needed to find uname on a Pyramid OSx when run in the BSD universe. -# (ghazi@noc.rutgers.edu 1994-08-24) -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then - PATH=$PATH:/.attbin ; export PATH -fi - -UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown -UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown -UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown - -# Note: order is significant - the case branches are not exclusive. - -case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in - *:NetBSD:*:*) - # NetBSD (nbsd) targets should (where applicable) match one or - # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, - # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently - # switched to ELF, *-*-netbsd* would select the old - # object file format. This provides both forward - # compatibility and a consistent mechanism for selecting the - # object file format. - # - # Note: NetBSD doesn't particularly care about the vendor - # portion of the name. We always set it to "unknown". - sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || echo unknown)` - case "${UNAME_MACHINE_ARCH}" in - armeb) machine=armeb-unknown ;; - arm*) machine=arm-unknown ;; - sh3el) machine=shl-unknown ;; - sh3eb) machine=sh-unknown ;; - *) machine=${UNAME_MACHINE_ARCH}-unknown ;; - esac - # The Operating System including object format, if it has switched - # to ELF recently, or will in the future. - case "${UNAME_MACHINE_ARCH}" in - arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval $set_cc_for_build - if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep __ELF__ >/dev/null - then - # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). - # Return netbsd for either. FIX? - os=netbsd - else - os=netbsdelf - fi - ;; - *) - os=netbsd - ;; - esac - # The OS release - # Debian GNU/NetBSD machines have a different userland, and - # thus, need a distinct triplet. However, they do not need - # kernel version information, so it can be replaced with a - # suitable tag, in the style of linux-gnu. - case "${UNAME_VERSION}" in - Debian*) - release='-gnu' - ;; - *) - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - ;; - esac - # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: - # contains redundant information, the shorter form: - # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" - exit 0 ;; - amiga:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - arc:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - hp300:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mac68k:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - macppc:OpenBSD:*:*) - echo powerpc-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvme68k:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvme88k:OpenBSD:*:*) - echo m88k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvmeppc:OpenBSD:*:*) - echo powerpc-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - pmax:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - sgi:OpenBSD:*:*) - echo mipseb-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - sun3:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - wgrisc:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - *:OpenBSD:*:*) - echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - alpha:OSF1:*:*) - if test $UNAME_RELEASE = "V4.0"; then - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - fi - # According to Compaq, /usr/sbin/psrinfo has been available on - # OSF/1 and Tru64 systems produced since 1995. I hope that - # covers most systems running today. This code pipes the CPU - # types through head -n 1, so we only detect the type of CPU 0. - ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` - case "$ALPHA_CPU_TYPE" in - "EV4 (21064)") - UNAME_MACHINE="alpha" ;; - "EV4.5 (21064)") - UNAME_MACHINE="alpha" ;; - "LCA4 (21066/21068)") - UNAME_MACHINE="alpha" ;; - "EV5 (21164)") - UNAME_MACHINE="alphaev5" ;; - "EV5.6 (21164A)") - UNAME_MACHINE="alphaev56" ;; - "EV5.6 (21164PC)") - UNAME_MACHINE="alphapca56" ;; - "EV5.7 (21164PC)") - UNAME_MACHINE="alphapca57" ;; - "EV6 (21264)") - UNAME_MACHINE="alphaev6" ;; - "EV6.7 (21264A)") - UNAME_MACHINE="alphaev67" ;; - "EV6.8CB (21264C)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8AL (21264B)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8CX (21264D)") - UNAME_MACHINE="alphaev68" ;; - "EV6.9A (21264/EV69A)") - UNAME_MACHINE="alphaev69" ;; - "EV7 (21364)") - UNAME_MACHINE="alphaev7" ;; - "EV7.9 (21364A)") - UNAME_MACHINE="alphaev79" ;; - esac - # A Vn.n version is a released version. - # A Tn.n version is a released field test version. - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - exit 0 ;; - Alpha\ *:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # Should we change UNAME_MACHINE based on the output of uname instead - # of the specific Alpha model? - echo alpha-pc-interix - exit 0 ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 - exit 0 ;; - Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 - exit 0;; - *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos - exit 0 ;; - *:[Mm]orph[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-morphos - exit 0 ;; - *:OS/390:*:*) - echo i370-ibm-openedition - exit 0 ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} - exit 0;; - SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp - exit 0;; - Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) - # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi - exit 0 ;; - NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 - exit 0 ;; - DRS?6000:UNIX_SV:4.2*:7*) - case `/usr/bin/uname -p` in - sparc) echo sparc-icl-nx7 && exit 0 ;; - esac ;; - sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; - i86pc:SunOS:5.*:*) - echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; - sun4*:SunOS:6*:*) - # According to config.sub, this is the proper way to canonicalize - # SunOS6. Hard to guess exactly what SunOS6 will be like, but - # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; - sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in - Series*|S4*) - UNAME_RELEASE=`uname -v` - ;; - esac - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` - exit 0 ;; - sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} - exit 0 ;; - sun*:*:4.2BSD:*) - UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 - case "`/bin/arch`" in - sun3) - echo m68k-sun-sunos${UNAME_RELEASE} - ;; - sun4) - echo sparc-sun-sunos${UNAME_RELEASE} - ;; - esac - exit 0 ;; - aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} - exit 0 ;; - # The situation for MiNT is a little confusing. The machine name - # can be virtually everything (everything which is not - # "atarist" or "atariste" at least should have a processor - # > m68000). The system name ranges from "MiNT" over "FreeMiNT" - # to the lowercase version "mint" (or "freemint"). Finally - # the system name "TOS" denotes a system which is actually not - # MiNT. But MiNT is downward compatible to TOS, so this should - # be no problem. - atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit 0 ;; - atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit 0 ;; - *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit 0 ;; - milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} - exit 0 ;; - hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} - exit 0 ;; - *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} - exit 0 ;; - powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} - exit 0 ;; - RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 - exit 0 ;; - RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} - exit 0 ;; - VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} - exit 0 ;; - 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} - exit 0 ;; - mips:*:*:UMIPS | mips:*:*:RISCos) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c -#ifdef __cplusplus -#include /* for printf() prototype */ - int main (int argc, char *argv[]) { -#else - int main (argc, argv) int argc; char *argv[]; { -#endif - #if defined (host_mips) && defined (MIPSEB) - #if defined (SYSTYPE_SYSV) - printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_SVR4) - printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); - #endif - #endif - exit (-1); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c \ - && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ - && exit 0 - echo mips-mips-riscos${UNAME_RELEASE} - exit 0 ;; - Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax - exit 0 ;; - Motorola:*:4.3:PL8-*) - echo powerpc-harris-powermax - exit 0 ;; - Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - echo powerpc-harris-powermax - exit 0 ;; - Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix - exit 0 ;; - m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 - exit 0 ;; - m88k:*:4*:R4*) - echo m88k-motorola-sysv4 - exit 0 ;; - m88k:*:3*:R3*) - echo m88k-motorola-sysv3 - exit 0 ;; - AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] - then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ - [ ${TARGET_BINARY_INTERFACE}x = x ] - then - echo m88k-dg-dgux${UNAME_RELEASE} - else - echo m88k-dg-dguxbcs${UNAME_RELEASE} - fi - else - echo i586-dg-dgux${UNAME_RELEASE} - fi - exit 0 ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 - exit 0 ;; - M88*:*:R3*:*) - # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 - exit 0 ;; - XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 - exit 0 ;; - Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd - exit 0 ;; - *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` - exit 0 ;; - ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i*86:AIX:*:*) - echo i386-ibm-aix - exit 0 ;; - ia64:AIX:*:*) - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} - exit 0 ;; - *:AIX:2:3) - if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - - main() - { - if (!__power_pc()) - exit(1); - puts("powerpc-ibm-aix3.2.5"); - exit(0); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 - echo rs6000-ibm-aix3.2.5 - elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 - else - echo rs6000-ibm-aix3.2 - fi - exit 0 ;; - *:AIX:*:[45]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then - IBM_ARCH=rs6000 - else - IBM_ARCH=powerpc - fi - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} - exit 0 ;; - *:AIX:*:*) - echo rs6000-ibm-aix - exit 0 ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) - echo romp-ibm-bsd4.4 - exit 0 ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to - exit 0 ;; # report: romp-ibm BSD 4.3 - *:BOSX:*:*) - echo rs6000-bull-bosx - exit 0 ;; - DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 - exit 0 ;; - 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd - exit 0 ;; - hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 - exit 0 ;; - 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - case "${UNAME_MACHINE}" in - 9000/31? ) HP_ARCH=m68000 ;; - 9000/[34]?? ) HP_ARCH=m68k ;; - 9000/[678][0-9][0-9]) - if [ -x /usr/bin/getconf ]; then - sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "${sc_cpu_version}" in - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 - 532) # CPU_PA_RISC2_0 - case "${sc_kernel_bits}" in - 32) HP_ARCH="hppa2.0n" ;; - 64) HP_ARCH="hppa2.0w" ;; - '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 - esac ;; - esac - fi - if [ "${HP_ARCH}" = "" ]; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - - #define _HPUX_SOURCE - #include - #include - - int main () - { - #if defined(_SC_KERNEL_BITS) - long bits = sysconf(_SC_KERNEL_BITS); - #endif - long cpu = sysconf (_SC_CPU_VERSION); - - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1"); break; - case CPU_PA_RISC2_0: - #if defined(_SC_KERNEL_BITS) - switch (bits) - { - case 64: puts ("hppa2.0w"); break; - case 32: puts ("hppa2.0n"); break; - default: puts ("hppa2.0"); break; - } break; - #else /* !defined(_SC_KERNEL_BITS) */ - puts ("hppa2.0"); break; - #endif - default: puts ("hppa1.0"); break; - } - exit (0); - } -EOF - (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` - test -z "$HP_ARCH" && HP_ARCH=hppa - fi ;; - esac - if [ ${HP_ARCH} = "hppa2.0w" ] - then - # avoid double evaluation of $set_cc_for_build - test -n "$CC_FOR_BUILD" || eval $set_cc_for_build - if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null - then - HP_ARCH="hppa2.0w" - else - HP_ARCH="hppa64" - fi - fi - echo ${HP_ARCH}-hp-hpux${HPUX_REV} - exit 0 ;; - ia64:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux${HPUX_REV} - exit 0 ;; - 3050*:HI-UX:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - int - main () - { - long cpu = sysconf (_SC_CPU_VERSION); - /* The order matters, because CPU_IS_HP_MC68K erroneously returns - true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct - results, however. */ - if (CPU_IS_PA_RISC (cpu)) - { - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; - case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; - default: puts ("hppa-hitachi-hiuxwe2"); break; - } - } - else if (CPU_IS_HP_MC68K (cpu)) - puts ("m68k-hitachi-hiuxwe2"); - else puts ("unknown-hitachi-hiuxwe2"); - exit (0); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 - echo unknown-hitachi-hiuxwe2 - exit 0 ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) - echo hppa1.1-hp-bsd - exit 0 ;; - 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd - exit 0 ;; - *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix - exit 0 ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) - echo hppa1.1-hp-osf - exit 0 ;; - hp8??:OSF1:*:*) - echo hppa1.0-hp-osf - exit 0 ;; - i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk - else - echo ${UNAME_MACHINE}-unknown-osf1 - fi - exit 0 ;; - parisc*:Lites*:*:*) - echo hppa1.1-hp-lites - exit 0 ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd - exit 0 ;; - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit 0 ;; - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd - exit 0 ;; - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd - exit 0 ;; - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd - exit 0 ;; - CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; - CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ - | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ - -e 's/\.[^.]*$/.X/' - exit 0 ;; - CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; - CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; - CRAY*SV1:*:*:*) - echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; - *:UNICOS/mp:*:*) - echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; - F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit 0 ;; - i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} - exit 0 ;; - sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi${UNAME_RELEASE} - exit 0 ;; - *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} - exit 0 ;; - *:FreeBSD:*:*) - # Determine whether the default compiler uses glibc. - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - #if __GLIBC__ >= 2 - LIBC=gnu - #else - LIBC= - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} - exit 0 ;; - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin - exit 0 ;; - i*:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 - exit 0 ;; - i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 - exit 0 ;; - x86:Interix*:3*) - echo i586-pc-interix3 - exit 0 ;; - [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) - echo i${UNAME_MACHINE}-pc-mks - exit 0 ;; - i*:Windows_NT*:* | Pentium*:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we - # UNAME_MACHINE based on the output of uname instead of i386? - echo i586-pc-interix - exit 0 ;; - i*:UWIN*:*) - echo ${UNAME_MACHINE}-pc-uwin - exit 0 ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin - exit 0 ;; - prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; - *:GNU:*:*) - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` - exit 0 ;; - i*86:Minix:*:*) - echo ${UNAME_MACHINE}-pc-minix - exit 0 ;; - arm*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; - ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; - m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; - mips:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef mips - #undef mipsel - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mipsel - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips - #else - CPU= - #endif - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` - test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 - ;; - mips64:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef mips64 - #undef mips64el - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mips64el - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips64 - #else - CPU= - #endif - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` - test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 - ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu - exit 0 ;; - ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu - exit 0 ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in - EV5) UNAME_MACHINE=alphaev5 ;; - EV56) UNAME_MACHINE=alphaev56 ;; - PCA56) UNAME_MACHINE=alphapca56 ;; - PCA57) UNAME_MACHINE=alphapca56 ;; - EV6) UNAME_MACHINE=alphaev6 ;; - EV67) UNAME_MACHINE=alphaev67 ;; - EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} - exit 0 ;; - parisc:Linux:*:* | hppa:Linux:*:*) - # Look for CPU level - case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-gnu ;; - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; - esac - exit 0 ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu - exit 0 ;; - s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux - exit 0 ;; - sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; - sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; - x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu - exit 0 ;; - i*86:Linux:*:*) - # The BFD linker knows what the default object file format is, so - # first see if it will tell us. cd to the root directory to prevent - # problems with other programs or directories called `ld' in the path. - # Set LC_ALL=C to ensure ld outputs messages in English. - ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ - | sed -ne '/supported targets:/!d - s/[ ][ ]*/ /g - s/.*supported targets: *// - s/ .*// - p'` - case "$ld_supported_targets" in - elf32-i386) - TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" - ;; - a.out-i386-linux) - echo "${UNAME_MACHINE}-pc-linux-gnuaout" - exit 0 ;; - coff-i386) - echo "${UNAME_MACHINE}-pc-linux-gnucoff" - exit 0 ;; - "") - # Either a pre-BFD a.out linker (linux-gnuoldld) or - # one that does not give us useful --help. - echo "${UNAME_MACHINE}-pc-linux-gnuoldld" - exit 0 ;; - esac - # Determine whether the default compiler is a.out or elf - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - #ifdef __ELF__ - # ifdef __GLIBC__ - # if __GLIBC__ >= 2 - LIBC=gnu - # else - LIBC=gnulibc1 - # endif - # else - LIBC=gnulibc1 - # endif - #else - #ifdef __INTEL_COMPILER - LIBC=gnu - #else - LIBC=gnuaout - #endif - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` - test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 - test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 - ;; - i*86:DYNIX/ptx:4*:*) - # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. - # earlier versions are messed up and put the nodename in both - # sysname and nodename. - echo i386-sequent-sysv4 - exit 0 ;; - i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, - # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} - exit 0 ;; - i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility - # is probably installed. - echo ${UNAME_MACHINE}-pc-os2-emx - exit 0 ;; - i*86:XTS-300:*:STOP) - echo ${UNAME_MACHINE}-unknown-stop - exit 0 ;; - i*86:atheos:*:*) - echo ${UNAME_MACHINE}-unknown-atheos - exit 0 ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; - i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp - exit 0 ;; - i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) - UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` - if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} - else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} - fi - exit 0 ;; - i*86:*:5:[78]*) - case `/bin/uname -X | grep "^Machine"` in - *486*) UNAME_MACHINE=i486 ;; - *Pentium) UNAME_MACHINE=i586 ;; - *Pent*|*Celeron) UNAME_MACHINE=i686 ;; - esac - echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} - exit 0 ;; - i*86:*:3.2:*) - if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` - (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ - && UNAME_MACHINE=i586 - (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ - && UNAME_MACHINE=i686 - (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ - && UNAME_MACHINE=i686 - echo ${UNAME_MACHINE}-pc-sco$UNAME_REL - else - echo ${UNAME_MACHINE}-pc-sysv32 - fi - exit 0 ;; - pc:*:*:*) - # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i386. - echo i386-pc-msdosdjgpp - exit 0 ;; - Intel:Mach:3*:*) - echo i386-pc-mach3 - exit 0 ;; - paragon:*:*:*) - echo i860-intel-osf1 - exit 0 ;; - i860:*:4.*:*) # i860-SVR4 - if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 - else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 - fi - exit 0 ;; - mini*:CTIX:SYS*5:*) - # "miniframe" - echo m68010-convergent-sysv - exit 0 ;; - mc68k:UNIX:SYSTEM5:3.51m) - echo m68k-convergent-sysv - exit 0 ;; - M680?0:D-NIX:5.3:*) - echo m68k-diab-dnix - exit 0 ;; - M68*:*:R3V[567]*:*) - test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; - 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0) - OS_REL='' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && echo i486-ncr-sysv4.3${OS_REL} && exit 0 - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && echo i486-ncr-sysv4 && exit 0 ;; - m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; - mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 - exit 0 ;; - TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; - rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) - echo powerpc-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; - SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} - exit 0 ;; - RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 - exit 0 ;; - RM*:SINIX-*:*:*) - echo mips-sni-sysv4 - exit 0 ;; - *:SINIX-*:*:*) - if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo ${UNAME_MACHINE}-sni-sysv4 - else - echo ns32k-sni-sysv - fi - exit 0 ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 - exit 0 ;; - *:UNIX_System_V:4*:FTX*) - # From Gerald Hewes . - # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 - exit 0 ;; - *:*:*:FTX*) - # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 - exit 0 ;; - *:VOS:*:*) - # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos - exit 0 ;; - mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} - exit 0 ;; - news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 - exit 0 ;; - R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} - else - echo mips-unknown-sysv${UNAME_RELEASE} - fi - exit 0 ;; - BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos - exit 0 ;; - BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos - exit 0 ;; - BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos - exit 0 ;; - SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} - exit 0 ;; - SX-5:SUPER-UX:*:*) - echo sx5-nec-superux${UNAME_RELEASE} - exit 0 ;; - SX-6:SUPER-UX:*:*) - echo sx6-nec-superux${UNAME_RELEASE} - exit 0 ;; - Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} - exit 0 ;; - *:Rhapsody:*:*) - echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} - exit 0 ;; - *:Darwin:*:*) - case `uname -p` in - *86) UNAME_PROCESSOR=i686 ;; - powerpc) UNAME_PROCESSOR=powerpc ;; - esac - echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} - exit 0 ;; - *:procnto*:*:* | *:QNX:[0123456789]*:*) - UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = "x86"; then - UNAME_PROCESSOR=i386 - UNAME_MACHINE=pc - fi - echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} - exit 0 ;; - *:QNX:*:4*) - echo i386-pc-qnx - exit 0 ;; - NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk${UNAME_RELEASE} - exit 0 ;; - *:NonStop-UX:*:*) - echo mips-compaq-nonstopux - exit 0 ;; - BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv - exit 0 ;; - DS/*:UNIX_System_V:*:*) - echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} - exit 0 ;; - *:Plan9:*:*) - # "uname -m" is not consistent, so use $cputype instead. 386 - # is converted to i386 for consistency with other x86 - # operating systems. - if test "$cputype" = "386"; then - UNAME_MACHINE=i386 - else - UNAME_MACHINE="$cputype" - fi - echo ${UNAME_MACHINE}-unknown-plan9 - exit 0 ;; - *:TOPS-10:*:*) - echo pdp10-unknown-tops10 - exit 0 ;; - *:TENEX:*:*) - echo pdp10-unknown-tenex - exit 0 ;; - KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 - exit 0 ;; - XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 - exit 0 ;; - *:TOPS-20:*:*) - echo pdp10-unknown-tops20 - exit 0 ;; - *:ITS:*:*) - echo pdp10-unknown-its - exit 0 ;; -esac - -#echo '(No uname command or uname output not recognized.)' 1>&2 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - -eval $set_cc_for_build -cat >$dummy.c < -# include -#endif -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix"); exit (0); -#endif - -#if defined (hp300) && !defined (hpux) - printf ("m68k-hp-bsd\n"); exit (0); -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - if (version < 4) - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - else - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - struct utsname un; - - uname(&un); - - if (strncmp(un.version, "V2", 2) == 0) { - printf ("i386-sequent-ptx2\n"); exit (0); - } - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ - printf ("i386-sequent-ptx1\n"); exit (0); - } - printf ("i386-sequent-ptx\n"); exit (0); - -#endif - -#if defined (vax) -# if !defined (ultrix) -# include -# if defined (BSD) -# if BSD == 43 - printf ("vax-dec-bsd4.3\n"); exit (0); -# else -# if BSD == 199006 - printf ("vax-dec-bsd4.3reno\n"); exit (0); -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# endif -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# else - printf ("vax-dec-ultrix\n"); exit (0); -# endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} -EOF - -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0 - -# Apollos put the system type in the environment. - -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } - -# Convex versions that predate uname can use getsysinfo(1) - -if [ -x /usr/convex/getsysinfo ] -then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd - exit 0 ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit 0 ;; - c34*) - echo c34-convex-bsd - exit 0 ;; - c38*) - echo c38-convex-bsd - exit 0 ;; - c4*) - echo c4-convex-bsd - exit 0 ;; - esac -fi - -cat >&2 < in order to provide the needed -information to handle your system. - -config.guess timestamp = $timestamp - -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null` - -hostinfo = `(hostinfo) 2>/dev/null` -/bin/universe = `(/bin/universe) 2>/dev/null` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` -/bin/arch = `(/bin/arch) 2>/dev/null` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` - -UNAME_MACHINE = ${UNAME_MACHINE} -UNAME_RELEASE = ${UNAME_RELEASE} -UNAME_SYSTEM = ${UNAME_SYSTEM} -UNAME_VERSION = ${UNAME_VERSION} -EOF - -exit 1 - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/config.sub b/config.sub deleted file mode 100644 index 1589de7..0000000 --- a/config.sub +++ /dev/null @@ -1,1485 +0,0 @@ -#! /bin/sh -# Configuration validation subroutine script. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. - -timestamp='2003-02-22' - -# This file is (in principle) common to ALL GNU software. -# The presence of a machine in this file suggests that SOME GNU software -# can handle that machine. It does not imply ALL GNU software can. -# -# This file is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, -# Boston, MA 02111-1307, USA. - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. -# -# Configuration subroutine to validate and canonicalize a configuration type. -# Supply the specified configuration type as an argument. -# If it is invalid, we print an error message on stderr and exit with code 1. -# Otherwise, we print the canonical config type on stdout and succeed. - -# This file is supposed to be the same for all GNU packages -# and recognize all the CPU types, system types and aliases -# that are meaningful with *any* GNU software. -# Each package is responsible for reporting which valid configurations -# it does not support. The user should be able to distinguish -# a failure to support a valid configuration from a meaningless -# configuration. - -# The goal of this file is to map all the various variations of a given -# machine specification into a single specification in the form: -# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM -# or in some cases, the newer four-part form: -# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM -# It is wrong to echo any other type of specification. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] CPU-MFR-OPSYS - $0 [OPTION] ALIAS - -Canonicalize a configuration name. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.sub ($timestamp) - -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 -Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit 0 ;; - --version | -v ) - echo "$version" ; exit 0 ;; - --help | --h* | -h ) - echo "$usage"; exit 0 ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" - exit 1 ;; - - *local*) - # First pass through any local machine types. - echo $1 - exit 0;; - - * ) - break ;; - esac -done - -case $# in - 0) echo "$me: missing argument$help" >&2 - exit 1;; - 1) ;; - *) echo "$me: too many arguments$help" >&2 - exit 1;; -esac - -# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). -# Here we must recognize all the valid KERNEL-OS combinations. -maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` -case $maybe_os in - nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; - *) - basic_machine=`echo $1 | sed 's/-[^-]*$//'` - if [ $basic_machine != $1 ] - then os=`echo $1 | sed 's/.*-/-/'` - else os=; fi - ;; -esac - -### Let's recognize common machines as not being operating systems so -### that things like config.sub decstation-3100 work. We also -### recognize some manufacturers as not being operating systems, so we -### can provide default operating systems below. -case $os in - -sun*os*) - # Prevent following clause from handling this invalid input. - ;; - -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ - -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ - -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis) - os= - basic_machine=$1 - ;; - -sim | -cisco | -oki | -wec | -winbond) - os= - basic_machine=$1 - ;; - -scout) - ;; - -wrs) - os=-vxworks - basic_machine=$1 - ;; - -chorusos*) - os=-chorusos - basic_machine=$1 - ;; - -chorusrdb) - os=-chorusrdb - basic_machine=$1 - ;; - -hiux*) - os=-hiuxwe2 - ;; - -sco5) - os=-sco3.2v5 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco4) - os=-sco3.2v4 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2v[4-9]*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -udk*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -isc) - os=-isc2.2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -clix*) - basic_machine=clipper-intergraph - ;; - -isc*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -lynx*) - os=-lynxos - ;; - -ptx*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` - ;; - -windowsnt*) - os=`echo $os | sed -e 's/windowsnt/winnt/'` - ;; - -psos*) - os=-psos - ;; - -mint | -mint[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; -esac - -# Decode aliases for certain CPU-COMPANY combinations. -case $basic_machine in - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. - 1750a | 580 \ - | a29k \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ - | clipper \ - | d10v | d30v | dlx | dsp16xx \ - | fr30 | frv \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | i370 | i860 | i960 | ia64 \ - | ip2k \ - | m32r | m68000 | m68k | m88k | mcore \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ - | mips64vr | mips64vrel \ - | mips64orion | mips64orionel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa64 | mipsisa64el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ - | msp430 \ - | ns16k | ns32k \ - | openrisc | or32 \ - | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ - | pyramid \ - | s390 | s390x \ - | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ - | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \ - | strongarm \ - | tahoe | thumb | tic80 | tron \ - | v850 | v850e \ - | we32k \ - | x86 | xscale | xstormy16 | xtensa \ - | z8k) - basic_machine=$basic_machine-unknown - ;; - m6811 | m68hc11 | m6812 | m68hc12) - # Motorola 68HC11/12. - basic_machine=$basic_machine-unknown - os=-none - ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) - ;; - - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and - # (2) the word "unknown" tends to confuse beginning users. - i*86 | x86_64) - basic_machine=$basic_machine-pc - ;; - # Object if more than one company name word. - *-*-*) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; - # Recognize the basic CPU types with company name. - 580-* \ - | a29k-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* \ - | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ - | clipper-* | cydra-* \ - | d10v-* | d30v-* | dlx-* \ - | elxsi-* \ - | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | i*86-* | i860-* | i960-* | ia64-* \ - | ip2k-* \ - | m32r-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | mcore-* \ - | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ - | mips64vr-* | mips64vrel-* \ - | mips64orion-* | mips64orionel-* \ - | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* \ - | mips64vr5000-* | mips64vr5000el-* \ - | mipsisa32-* | mipsisa32el-* \ - | mipsisa32r2-* | mipsisa32r2el-* \ - | mipsisa64-* | mipsisa64el-* \ - | mipsisa64sb1-* | mipsisa64sb1el-* \ - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipstx39-* | mipstx39el-* \ - | msp430-* \ - | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ - | pyramid-* \ - | romp-* | rs6000-* \ - | s390-* | s390x-* \ - | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ - | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ - | tahoe-* | thumb-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ - | tron-* \ - | v850-* | v850e-* | vax-* \ - | we32k-* \ - | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \ - | xtensa-* \ - | ymp-* \ - | z8k-*) - ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. - 386bsd) - basic_machine=i386-unknown - os=-bsd - ;; - 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - basic_machine=m68000-att - ;; - 3b*) - basic_machine=we32k-att - ;; - a29khif) - basic_machine=a29k-amd - os=-udi - ;; - adobe68k) - basic_machine=m68010-adobe - os=-scout - ;; - alliant | fx80) - basic_machine=fx80-alliant - ;; - altos | altos3068) - basic_machine=m68k-altos - ;; - am29k) - basic_machine=a29k-none - os=-bsd - ;; - amdahl) - basic_machine=580-amdahl - os=-sysv - ;; - amiga | amiga-*) - basic_machine=m68k-unknown - ;; - amigaos | amigados) - basic_machine=m68k-unknown - os=-amigaos - ;; - amigaunix | amix) - basic_machine=m68k-unknown - os=-sysv4 - ;; - apollo68) - basic_machine=m68k-apollo - os=-sysv - ;; - apollo68bsd) - basic_machine=m68k-apollo - os=-bsd - ;; - aux) - basic_machine=m68k-apple - os=-aux - ;; - balance) - basic_machine=ns32k-sequent - os=-dynix - ;; - c90) - basic_machine=c90-cray - os=-unicos - ;; - convex-c1) - basic_machine=c1-convex - os=-bsd - ;; - convex-c2) - basic_machine=c2-convex - os=-bsd - ;; - convex-c32) - basic_machine=c32-convex - os=-bsd - ;; - convex-c34) - basic_machine=c34-convex - os=-bsd - ;; - convex-c38) - basic_machine=c38-convex - os=-bsd - ;; - cray | j90) - basic_machine=j90-cray - os=-unicos - ;; - crds | unos) - basic_machine=m68k-crds - ;; - cris | cris-* | etrax*) - basic_machine=cris-axis - ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) - basic_machine=mips-dec - ;; - decsystem10* | dec10*) - basic_machine=pdp10-dec - os=-tops10 - ;; - decsystem20* | dec20*) - basic_machine=pdp10-dec - os=-tops20 - ;; - delta | 3300 | motorola-3300 | motorola-delta \ - | 3300-motorola | delta-motorola) - basic_machine=m68k-motorola - ;; - delta88) - basic_machine=m88k-motorola - os=-sysv3 - ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx - ;; - dpx2* | dpx2*-bull) - basic_machine=m68k-bull - os=-sysv3 - ;; - ebmon29k) - basic_machine=a29k-amd - os=-ebmon - ;; - elxsi) - basic_machine=elxsi-elxsi - os=-bsd - ;; - encore | umax | mmax) - basic_machine=ns32k-encore - ;; - es1800 | OSE68k | ose68k | ose | OSE) - basic_machine=m68k-ericsson - os=-ose - ;; - fx2800) - basic_machine=i860-alliant - ;; - genix) - basic_machine=ns32k-ns - ;; - gmicro) - basic_machine=tron-gmicro - os=-sysv - ;; - go32) - basic_machine=i386-pc - os=-go32 - ;; - h3050r* | hiux*) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - h8300hms) - basic_machine=h8300-hitachi - os=-hms - ;; - h8300xray) - basic_machine=h8300-hitachi - os=-xray - ;; - h8500hms) - basic_machine=h8500-hitachi - os=-hms - ;; - harris) - basic_machine=m88k-harris - os=-sysv3 - ;; - hp300-*) - basic_machine=m68k-hp - ;; - hp300bsd) - basic_machine=m68k-hp - os=-bsd - ;; - hp300hpux) - basic_machine=m68k-hp - os=-hpux - ;; - hp3k9[0-9][0-9] | hp9[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k2[0-9][0-9] | hp9k31[0-9]) - basic_machine=m68000-hp - ;; - hp9k3[2-9][0-9]) - basic_machine=m68k-hp - ;; - hp9k6[0-9][0-9] | hp6[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k7[0-79][0-9] | hp7[0-79][0-9]) - basic_machine=hppa1.1-hp - ;; - hp9k78[0-9] | hp78[0-9]) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][13679] | hp8[0-9][13679]) - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][0-9] | hp8[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hppa-next) - os=-nextstep3 - ;; - hppaosf) - basic_machine=hppa1.1-hp - os=-osf - ;; - hppro) - basic_machine=hppa1.1-hp - os=-proelf - ;; - i370-ibm* | ibm*) - basic_machine=i370-ibm - ;; -# I'm not sure what "Sysv32" means. Should this be sysv3.2? - i*86v32) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv32 - ;; - i*86v4*) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv4 - ;; - i*86v) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv - ;; - i*86sol2) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-solaris2 - ;; - i386mach) - basic_machine=i386-mach - os=-mach - ;; - i386-vsta | vsta) - basic_machine=i386-unknown - os=-vsta - ;; - iris | iris4d) - basic_machine=mips-sgi - case $os in - -irix*) - ;; - *) - os=-irix4 - ;; - esac - ;; - isi68 | isi) - basic_machine=m68k-isi - os=-sysv - ;; - m88k-omron*) - basic_machine=m88k-omron - ;; - magnum | m3230) - basic_machine=mips-mips - os=-sysv - ;; - merlin) - basic_machine=ns32k-utek - os=-sysv - ;; - mingw32) - basic_machine=i386-pc - os=-mingw32 - ;; - miniframe) - basic_machine=m68000-convergent - ;; - *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; - mips3*-*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` - ;; - mips3*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown - ;; - mmix*) - basic_machine=mmix-knuth - os=-mmixware - ;; - monitor) - basic_machine=m68k-rom68k - os=-coff - ;; - morphos) - basic_machine=powerpc-unknown - os=-morphos - ;; - msdos) - basic_machine=i386-pc - os=-msdos - ;; - mvs) - basic_machine=i370-ibm - os=-mvs - ;; - ncr3000) - basic_machine=i486-ncr - os=-sysv4 - ;; - netbsd386) - basic_machine=i386-unknown - os=-netbsd - ;; - netwinder) - basic_machine=armv4l-rebel - os=-linux - ;; - news | news700 | news800 | news900) - basic_machine=m68k-sony - os=-newsos - ;; - news1000) - basic_machine=m68030-sony - os=-newsos - ;; - news-3600 | risc-news) - basic_machine=mips-sony - os=-newsos - ;; - necv70) - basic_machine=v70-nec - os=-sysv - ;; - next | m*-next ) - basic_machine=m68k-next - case $os in - -nextstep* ) - ;; - -ns2*) - os=-nextstep2 - ;; - *) - os=-nextstep3 - ;; - esac - ;; - nh3000) - basic_machine=m68k-harris - os=-cxux - ;; - nh[45]000) - basic_machine=m88k-harris - os=-cxux - ;; - nindy960) - basic_machine=i960-intel - os=-nindy - ;; - mon960) - basic_machine=i960-intel - os=-mon960 - ;; - nonstopux) - basic_machine=mips-compaq - os=-nonstopux - ;; - np1) - basic_machine=np1-gould - ;; - nv1) - basic_machine=nv1-cray - os=-unicosmp - ;; - nsr-tandem) - basic_machine=nsr-tandem - ;; - op50n-* | op60c-*) - basic_machine=hppa1.1-oki - os=-proelf - ;; - or32 | or32-*) - basic_machine=or32-unknown - os=-coff - ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson - os=-ose - ;; - os68k) - basic_machine=m68k-none - os=-os68k - ;; - pa-hitachi) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - paragon) - basic_machine=i860-intel - os=-osf - ;; - pbd) - basic_machine=sparc-tti - ;; - pbb) - basic_machine=m68k-tti - ;; - pc532 | pc532-*) - basic_machine=ns32k-pc532 - ;; - pentium | p5 | k5 | k6 | nexgen | viac3) - basic_machine=i586-pc - ;; - pentiumpro | p6 | 6x86 | athlon | athlon_*) - basic_machine=i686-pc - ;; - pentiumii | pentium2) - basic_machine=i686-pc - ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumii-* | pentium2-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pn) - basic_machine=pn-gould - ;; - power) basic_machine=power-ibm - ;; - ppc) basic_machine=powerpc-unknown - ;; - ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppcle | powerpclittle | ppc-le | powerpc-little) - basic_machine=powerpcle-unknown - ;; - ppcle-* | powerpclittle-*) - basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64) basic_machine=powerpc64-unknown - ;; - ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64le | powerpc64little | ppc64-le | powerpc64-little) - basic_machine=powerpc64le-unknown - ;; - ppc64le-* | powerpc64little-*) - basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ps2) - basic_machine=i386-ibm - ;; - pw32) - basic_machine=i586-unknown - os=-pw32 - ;; - rom68k) - basic_machine=m68k-rom68k - os=-coff - ;; - rm[46]00) - basic_machine=mips-siemens - ;; - rtpc | rtpc-*) - basic_machine=romp-ibm - ;; - sa29200) - basic_machine=a29k-amd - os=-udi - ;; - sb1) - basic_machine=mipsisa64sb1-unknown - ;; - sb1el) - basic_machine=mipsisa64sb1el-unknown - ;; - sequent) - basic_machine=i386-sequent - ;; - sh) - basic_machine=sh-hitachi - os=-hms - ;; - sparclite-wrs | simso-wrs) - basic_machine=sparclite-wrs - os=-vxworks - ;; - sps7) - basic_machine=m68k-bull - os=-sysv2 - ;; - spur) - basic_machine=spur-unknown - ;; - st2000) - basic_machine=m68k-tandem - ;; - stratus) - basic_machine=i860-stratus - os=-sysv4 - ;; - sun2) - basic_machine=m68000-sun - ;; - sun2os3) - basic_machine=m68000-sun - os=-sunos3 - ;; - sun2os4) - basic_machine=m68000-sun - os=-sunos4 - ;; - sun3os3) - basic_machine=m68k-sun - os=-sunos3 - ;; - sun3os4) - basic_machine=m68k-sun - os=-sunos4 - ;; - sun4os3) - basic_machine=sparc-sun - os=-sunos3 - ;; - sun4os4) - basic_machine=sparc-sun - os=-sunos4 - ;; - sun4sol2) - basic_machine=sparc-sun - os=-solaris2 - ;; - sun3 | sun3-*) - basic_machine=m68k-sun - ;; - sun4) - basic_machine=sparc-sun - ;; - sun386 | sun386i | roadrunner) - basic_machine=i386-sun - ;; - sv1) - basic_machine=sv1-cray - os=-unicos - ;; - symmetry) - basic_machine=i386-sequent - os=-dynix - ;; - t3e) - basic_machine=alphaev5-cray - os=-unicos - ;; - t90) - basic_machine=t90-cray - os=-unicos - ;; - tic4x | c4x*) - basic_machine=tic4x-unknown - os=-coff - ;; - tic54x | c54x*) - basic_machine=tic54x-unknown - os=-coff - ;; - tic55x | c55x*) - basic_machine=tic55x-unknown - os=-coff - ;; - tic6x | c6x*) - basic_machine=tic6x-unknown - os=-coff - ;; - tx39) - basic_machine=mipstx39-unknown - ;; - tx39el) - basic_machine=mipstx39el-unknown - ;; - toad1) - basic_machine=pdp10-xkl - os=-tops20 - ;; - tower | tower-32) - basic_machine=m68k-ncr - ;; - udi29k) - basic_machine=a29k-amd - os=-udi - ;; - ultra3) - basic_machine=a29k-nyu - os=-sym1 - ;; - v810 | necv810) - basic_machine=v810-nec - os=-none - ;; - vaxv) - basic_machine=vax-dec - os=-sysv - ;; - vms) - basic_machine=vax-dec - os=-vms - ;; - vpp*|vx|vx-*) - basic_machine=f301-fujitsu - ;; - vxworks960) - basic_machine=i960-wrs - os=-vxworks - ;; - vxworks68) - basic_machine=m68k-wrs - os=-vxworks - ;; - vxworks29k) - basic_machine=a29k-wrs - os=-vxworks - ;; - w65*) - basic_machine=w65-wdc - os=-none - ;; - w89k-*) - basic_machine=hppa1.1-winbond - os=-proelf - ;; - xps | xps100) - basic_machine=xps100-honeywell - ;; - ymp) - basic_machine=ymp-cray - os=-unicos - ;; - z8k-*-coff) - basic_machine=z8k-unknown - os=-sim - ;; - none) - basic_machine=none-none - os=-none - ;; - -# Here we handle the default manufacturer of certain CPU types. It is in -# some cases the only manufacturer, in others, it is the most popular. - w89k) - basic_machine=hppa1.1-winbond - ;; - op50n) - basic_machine=hppa1.1-oki - ;; - op60c) - basic_machine=hppa1.1-oki - ;; - romp) - basic_machine=romp-ibm - ;; - rs6000) - basic_machine=rs6000-ibm - ;; - vax) - basic_machine=vax-dec - ;; - pdp10) - # there are many clones, so DEC is not a safe bet - basic_machine=pdp10-unknown - ;; - pdp11) - basic_machine=pdp11-dec - ;; - we32k) - basic_machine=we32k-att - ;; - sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) - basic_machine=sh-unknown - ;; - sh64) - basic_machine=sh64-unknown - ;; - sparc | sparcv9 | sparcv9b) - basic_machine=sparc-sun - ;; - cydra) - basic_machine=cydra-cydrome - ;; - orion) - basic_machine=orion-highlevel - ;; - orion105) - basic_machine=clipper-highlevel - ;; - mac | mpw | mac-mpw) - basic_machine=m68k-apple - ;; - pmac | pmac-mpw) - basic_machine=powerpc-apple - ;; - *-unknown) - # Make sure to match an already-canonicalized machine name. - ;; - *) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; -esac - -# Here we canonicalize certain aliases for manufacturers. -case $basic_machine in - *-digital*) - basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` - ;; - *-commodore*) - basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` - ;; - *) - ;; -esac - -# Decode manufacturer-specific aliases for certain operating systems. - -if [ x"$os" != x"" ] -then -case $os in - # First match some system type aliases - # that might get confused with valid system types. - # -solaris* is a basic system type, with this one exception. - -solaris1 | -solaris1.*) - os=`echo $os | sed -e 's|solaris1|sunos4|'` - ;; - -solaris) - os=-solaris2 - ;; - -svr4*) - os=-sysv4 - ;; - -unixware*) - os=-sysv4.2uw - ;; - -gnu/linux*) - os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` - ;; - # First accept the basic system types. - # The portable systems comes first. - # Each alternative MUST END IN A *, to match a version number. - # -sysv* is not here because it comes later, after sysvr4. - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ - | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ - | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ - | -powermax* | -dnix*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -qnx*) - case $basic_machine in - x86-* | i*86-*) - ;; - *) - os=-nto$os - ;; - esac - ;; - -nto-qnx*) - ;; - -nto*) - os=`echo $os | sed -e 's|nto|nto-qnx|'` - ;; - -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ - | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) - ;; - -mac*) - os=`echo $os | sed -e 's|mac|macos|'` - ;; - -linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` - ;; - -sunos5*) - os=`echo $os | sed -e 's|sunos5|solaris2|'` - ;; - -sunos6*) - os=`echo $os | sed -e 's|sunos6|solaris3|'` - ;; - -opened*) - os=-openedition - ;; - -wince*) - os=-wince - ;; - -osfrose*) - os=-osfrose - ;; - -osf*) - os=-osf - ;; - -utek*) - os=-bsd - ;; - -dynix*) - os=-bsd - ;; - -acis*) - os=-aos - ;; - -atheos*) - os=-atheos - ;; - -386bsd) - os=-bsd - ;; - -ctix* | -uts*) - os=-sysv - ;; - -nova*) - os=-rtmk-nova - ;; - -ns2 ) - os=-nextstep2 - ;; - -nsk*) - os=-nsk - ;; - # Preserve the version number of sinix5. - -sinix5.*) - os=`echo $os | sed -e 's|sinix|sysv|'` - ;; - -sinix*) - os=-sysv4 - ;; - -triton*) - os=-sysv3 - ;; - -oss*) - os=-sysv3 - ;; - -svr4) - os=-sysv4 - ;; - -svr3) - os=-sysv3 - ;; - -sysvr4) - os=-sysv4 - ;; - # This must come after -sysvr4. - -sysv*) - ;; - -ose*) - os=-ose - ;; - -es1800*) - os=-ose - ;; - -xenix) - os=-xenix - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - os=-mint - ;; - -aros*) - os=-aros - ;; - -kaos*) - os=-kaos - ;; - -none) - ;; - *) - # Get rid of the `-' at the beginning of $os. - os=`echo $os | sed 's/[^-]*-//'` - echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 - exit 1 - ;; -esac -else - -# Here we handle the default operating systems that come with various machines. -# The value should be what the vendor currently ships out the door with their -# machine or put another way, the most popular os provided with the machine. - -# Note that if you're going to try to match "-MANUFACTURER" here (say, -# "-sun"), then you have to tell the case statement up towards the top -# that MANUFACTURER isn't an operating system. Otherwise, code above -# will signal an error saying that MANUFACTURER isn't an operating -# system, and we'll never get to this point. - -case $basic_machine in - *-acorn) - os=-riscix1.2 - ;; - arm*-rebel) - os=-linux - ;; - arm*-semi) - os=-aout - ;; - # This must come before the *-dec entry. - pdp10-*) - os=-tops20 - ;; - pdp11-*) - os=-none - ;; - *-dec | vax-*) - os=-ultrix4.2 - ;; - m68*-apollo) - os=-domain - ;; - i386-sun) - os=-sunos4.0.2 - ;; - m68000-sun) - os=-sunos3 - # This also exists in the configure program, but was not the - # default. - # os=-sunos4 - ;; - m68*-cisco) - os=-aout - ;; - mips*-cisco) - os=-elf - ;; - mips*-*) - os=-elf - ;; - or32-*) - os=-coff - ;; - *-tti) # must be before sparc entry or we get the wrong os. - os=-sysv3 - ;; - sparc-* | *-sun) - os=-sunos4.1.1 - ;; - *-be) - os=-beos - ;; - *-ibm) - os=-aix - ;; - *-wec) - os=-proelf - ;; - *-winbond) - os=-proelf - ;; - *-oki) - os=-proelf - ;; - *-hp) - os=-hpux - ;; - *-hitachi) - os=-hiux - ;; - i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) - os=-sysv - ;; - *-cbm) - os=-amigaos - ;; - *-dg) - os=-dgux - ;; - *-dolphin) - os=-sysv3 - ;; - m68k-ccur) - os=-rtu - ;; - m88k-omron*) - os=-luna - ;; - *-next ) - os=-nextstep - ;; - *-sequent) - os=-ptx - ;; - *-crds) - os=-unos - ;; - *-ns) - os=-genix - ;; - i370-*) - os=-mvs - ;; - *-next) - os=-nextstep3 - ;; - *-gould) - os=-sysv - ;; - *-highlevel) - os=-bsd - ;; - *-encore) - os=-bsd - ;; - *-sgi) - os=-irix - ;; - *-siemens) - os=-sysv4 - ;; - *-masscomp) - os=-rtu - ;; - f30[01]-fujitsu | f700-fujitsu) - os=-uxpv - ;; - *-rom68k) - os=-coff - ;; - *-*bug) - os=-coff - ;; - *-apple) - os=-macos - ;; - *-atari*) - os=-mint - ;; - *) - os=-none - ;; -esac -fi - -# Here we handle the case where we know the os, and the CPU type, but not the -# manufacturer. We pick the logical manufacturer. -vendor=unknown -case $basic_machine in - *-unknown) - case $os in - -riscix*) - vendor=acorn - ;; - -sunos*) - vendor=sun - ;; - -aix*) - vendor=ibm - ;; - -beos*) - vendor=be - ;; - -hpux*) - vendor=hp - ;; - -mpeix*) - vendor=hp - ;; - -hiux*) - vendor=hitachi - ;; - -unos*) - vendor=crds - ;; - -dgux*) - vendor=dg - ;; - -luna*) - vendor=omron - ;; - -genix*) - vendor=ns - ;; - -mvs* | -opened*) - vendor=ibm - ;; - -ptx*) - vendor=sequent - ;; - -vxsim* | -vxworks* | -windiss*) - vendor=wrs - ;; - -aux*) - vendor=apple - ;; - -hms*) - vendor=hitachi - ;; - -mpw* | -macos*) - vendor=apple - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - vendor=atari - ;; - -vos*) - vendor=stratus - ;; - esac - basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` - ;; -esac - -echo $basic_machine$os -exit 0 - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: From 0c7a682bd0fa5e7df86239fd690fd672db6c8737 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 2 May 2003 09:51:49 +0000 Subject: [PATCH 067/213] 8.0.24-1 - Re-add config.{sub,guess} executable. --- config.guess | 1388 +++++++++++++++++++++++++++++++++++++ config.sub | 1485 ++++++++++++++++++++++++++++++++++++++++ redhat-rpm-config.spec | 6 +- 3 files changed, 2876 insertions(+), 3 deletions(-) create mode 100644 config.guess create mode 100644 config.sub diff --git a/config.guess b/config.guess new file mode 100644 index 0000000..cc726cd --- /dev/null +++ b/config.guess @@ -0,0 +1,1388 @@ +#! /bin/sh +# Attempt to guess a canonical system name. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. + +timestamp='2003-02-22' + +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Originally written by Per Bothner . +# Please send patches to . Submit a context +# diff and a properly formatted ChangeLog entry. +# +# This script attempts to guess a canonical system name similar to +# config.sub. If it succeeds, it prints the system name on stdout, and +# exits with 0. Otherwise, it exits with 1. +# +# The plan is that this can be called by configure scripts if you +# don't specify an explicit build system type. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] + +Output the configuration name of the system \`$me' is run on. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.guess ($timestamp) + +Originally written by Per Bothner. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit 0 ;; + --version | -v ) + echo "$version" ; exit 0 ;; + --help | --h* | -h ) + echo "$usage"; exit 0 ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 +fi + +trap 'exit 1' 1 2 15 + +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a +# compiler to aid in system detection is discouraged as it requires +# temporary files to be created and, as you can see below, it is a +# headache to deal with in a portable fashion. + +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. + +# Portable tmp directory creation inspired by the Autoconf team. + +set_cc_for_build=' +trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; +: ${TMPDIR=/tmp} ; + { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; +dummy=$tmp/dummy ; +tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; +case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int x;" > $dummy.c ; + for c in cc gcc c89 c99 ; do + if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then + CC_FOR_BUILD="$c"; break ; + fi ; + done ; + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found ; + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; +esac ;' + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@noc.rutgers.edu 1994-08-24) +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +# Note: order is significant - the case branches are not exclusive. + +case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + *:NetBSD:*:*) + # NetBSD (nbsd) targets should (where applicable) match one or + # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # + # Note: NetBSD doesn't particularly care about the vendor + # portion of the name. We always set it to "unknown". + sysctl="sysctl -n hw.machine_arch" + UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ + /usr/sbin/$sysctl 2>/dev/null || echo unknown)` + case "${UNAME_MACHINE_ARCH}" in + armeb) machine=armeb-unknown ;; + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; + *) machine=${UNAME_MACHINE_ARCH}-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently, or will in the future. + case "${UNAME_MACHINE_ARCH}" in + arm*|i386|m68k|ns32k|sh3*|sparc|vax) + eval $set_cc_for_build + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep __ELF__ >/dev/null + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # The OS release + # Debian GNU/NetBSD machines have a different userland, and + # thus, need a distinct triplet. However, they do not need + # kernel version information, so it can be replaced with a + # suitable tag, in the style of linux-gnu. + case "${UNAME_VERSION}" in + Debian*) + release='-gnu' + ;; + *) + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + ;; + esac + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "${machine}-${os}${release}" + exit 0 ;; + amiga:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + arc:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + hp300:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mac68k:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + macppc:OpenBSD:*:*) + echo powerpc-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvme68k:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvme88k:OpenBSD:*:*) + echo m88k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvmeppc:OpenBSD:*:*) + echo powerpc-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + pmax:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + sgi:OpenBSD:*:*) + echo mipseb-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + sun3:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + wgrisc:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + *:OpenBSD:*:*) + echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + alpha:OSF1:*:*) + if test $UNAME_RELEASE = "V4.0"; then + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + fi + # According to Compaq, /usr/sbin/psrinfo has been available on + # OSF/1 and Tru64 systems produced since 1995. I hope that + # covers most systems running today. This code pipes the CPU + # types through head -n 1, so we only detect the type of CPU 0. + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` + case "$ALPHA_CPU_TYPE" in + "EV4 (21064)") + UNAME_MACHINE="alpha" ;; + "EV4.5 (21064)") + UNAME_MACHINE="alpha" ;; + "LCA4 (21066/21068)") + UNAME_MACHINE="alpha" ;; + "EV5 (21164)") + UNAME_MACHINE="alphaev5" ;; + "EV5.6 (21164A)") + UNAME_MACHINE="alphaev56" ;; + "EV5.6 (21164PC)") + UNAME_MACHINE="alphapca56" ;; + "EV5.7 (21164PC)") + UNAME_MACHINE="alphapca57" ;; + "EV6 (21264)") + UNAME_MACHINE="alphaev6" ;; + "EV6.7 (21264A)") + UNAME_MACHINE="alphaev67" ;; + "EV6.8CB (21264C)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8AL (21264B)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8CX (21264D)") + UNAME_MACHINE="alphaev68" ;; + "EV6.9A (21264/EV69A)") + UNAME_MACHINE="alphaev69" ;; + "EV7 (21364)") + UNAME_MACHINE="alphaev7" ;; + "EV7.9 (21364A)") + UNAME_MACHINE="alphaev79" ;; + esac + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + exit 0 ;; + Alpha\ *:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # Should we change UNAME_MACHINE based on the output of uname instead + # of the specific Alpha model? + echo alpha-pc-interix + exit 0 ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 + exit 0 ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-unknown-sysv4 + exit 0;; + *:[Aa]miga[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-amigaos + exit 0 ;; + *:[Mm]orph[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-morphos + exit 0 ;; + *:OS/390:*:*) + echo i370-ibm-openedition + exit 0 ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} + exit 0;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit 0;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit 0 ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit 0 ;; + DRS?6000:UNIX_SV:4.2*:7*) + case `/usr/bin/uname -p` in + sparc) echo sparc-icl-nx7 && exit 0 ;; + esac ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + i86pc:SunOS:5.*:*) + echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` + exit 0 ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos${UNAME_RELEASE} + exit 0 ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + case "`/bin/arch`" in + sun3) + echo m68k-sun-sunos${UNAME_RELEASE} + ;; + sun4) + echo sparc-sun-sunos${UNAME_RELEASE} + ;; + esac + exit 0 ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos${UNAME_RELEASE} + exit 0 ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" + # to the lowercase version "mint" (or "freemint"). Finally + # the system name "TOS" denotes a system which is actually not + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit 0 ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit 0 ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit 0 ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint${UNAME_RELEASE} + exit 0 ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint${UNAME_RELEASE} + exit 0 ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint${UNAME_RELEASE} + exit 0 ;; + powerpc:machten:*:*) + echo powerpc-apple-machten${UNAME_RELEASE} + exit 0 ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit 0 ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix${UNAME_RELEASE} + exit 0 ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix${UNAME_RELEASE} + exit 0 ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix${UNAME_RELEASE} + exit 0 ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c +#ifdef __cplusplus +#include /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c \ + && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ + && exit 0 + echo mips-mips-riscos${UNAME_RELEASE} + exit 0 ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax + exit 0 ;; + Motorola:*:4.3:PL8-*) + echo powerpc-harris-powermax + exit 0 ;; + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) + echo powerpc-harris-powermax + exit 0 ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit 0 ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 + exit 0 ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 + exit 0 ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 + exit 0 ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] + then + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ + [ ${TARGET_BINARY_INTERFACE}x = x ] + then + echo m88k-dg-dgux${UNAME_RELEASE} + else + echo m88k-dg-dguxbcs${UNAME_RELEASE} + fi + else + echo i586-dg-dgux${UNAME_RELEASE} + fi + exit 0 ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit 0 ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 + exit 0 ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 + exit 0 ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd + exit 0 ;; + *:IRIX*:*:*) + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` + exit 0 ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i*86:AIX:*:*) + echo i386-ibm-aix + exit 0 ;; + ia64:AIX:*:*) + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} + exit 0 ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 + echo rs6000-ibm-aix3.2.5 + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi + exit 0 ;; + *:AIX:*:[45]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc + fi + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${IBM_ARCH}-ibm-aix${IBM_REV} + exit 0 ;; + *:AIX:*:*) + echo rs6000-ibm-aix + exit 0 ;; + ibmrt:4.4BSD:*|romp-ibm:BSD:*) + echo romp-ibm-bsd4.4 + exit 0 ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + exit 0 ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx + exit 0 ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 + exit 0 ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd + exit 0 ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 + exit 0 ;; + 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + case "${UNAME_MACHINE}" in + 9000/31? ) HP_ARCH=m68000 ;; + 9000/[34]?? ) HP_ARCH=m68k ;; + 9000/[678][0-9][0-9]) + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH="hppa2.0n" ;; + 64) HP_ARCH="hppa2.0w" ;; + '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 + esac ;; + esac + fi + if [ "${HP_ARCH}" = "" ]; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + + #define _HPUX_SOURCE + #include + #include + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } +EOF + (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + test -z "$HP_ARCH" && HP_ARCH=hppa + fi ;; + esac + if [ ${HP_ARCH} = "hppa2.0w" ] + then + # avoid double evaluation of $set_cc_for_build + test -n "$CC_FOR_BUILD" || eval $set_cc_for_build + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null + then + HP_ARCH="hppa2.0w" + else + HP_ARCH="hppa64" + fi + fi + echo ${HP_ARCH}-hp-hpux${HPUX_REV} + exit 0 ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux${HPUX_REV} + exit 0 ;; + 3050*:HI-UX:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 + echo unknown-hitachi-hiuxwe2 + exit 0 ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + echo hppa1.1-hp-bsd + exit 0 ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit 0 ;; + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) + echo hppa1.0-hp-mpeix + exit 0 ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + echo hppa1.1-hp-osf + exit 0 ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + exit 0 ;; + i*86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo ${UNAME_MACHINE}-unknown-osf1mk + else + echo ${UNAME_MACHINE}-unknown-osf1 + fi + exit 0 ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit 0 ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd + exit 0 ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit 0 ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd + exit 0 ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd + exit 0 ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd + exit 0 ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*[A-Z]90:*:*:*) + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ + -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*T3E:*:*:*) + echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + *:UNICOS/mp:*:*) + echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit 0 ;; + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + exit 0 ;; + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi${UNAME_RELEASE} + exit 0 ;; + *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + exit 0 ;; + *:FreeBSD:*:*) + # Determine whether the default compiler uses glibc. + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + #if __GLIBC__ >= 2 + LIBC=gnu + #else + LIBC= + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} + exit 0 ;; + i*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin + exit 0 ;; + i*:MINGW*:*) + echo ${UNAME_MACHINE}-pc-mingw32 + exit 0 ;; + i*:PW*:*) + echo ${UNAME_MACHINE}-pc-pw32 + exit 0 ;; + x86:Interix*:3*) + echo i586-pc-interix3 + exit 0 ;; + [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) + echo i${UNAME_MACHINE}-pc-mks + exit 0 ;; + i*:Windows_NT*:* | Pentium*:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we + # UNAME_MACHINE based on the output of uname instead of i386? + echo i586-pc-interix + exit 0 ;; + i*:UWIN*:*) + echo ${UNAME_MACHINE}-pc-uwin + exit 0 ;; + p*:CYGWIN*:*) + echo powerpcle-unknown-cygwin + exit 0 ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + *:GNU:*:*) + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + exit 0 ;; + i*86:Minix:*:*) + echo ${UNAME_MACHINE}-pc-minix + exit 0 ;; + arm*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + ia64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + m68*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + mips:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef mips + #undef mipsel + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=mipsel + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=mips + #else + CPU= + #endif + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` + test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 + ;; + mips64:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef mips64 + #undef mips64el + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=mips64el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=mips64 + #else + CPU= + #endif + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` + test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 + ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-gnu + exit 0 ;; + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-gnu + exit 0 ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null + if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + exit 0 ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + PA7*) echo hppa1.1-unknown-linux-gnu ;; + PA8*) echo hppa2.0-unknown-linux-gnu ;; + *) echo hppa-unknown-linux-gnu ;; + esac + exit 0 ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-gnu + exit 0 ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo ${UNAME_MACHINE}-ibm-linux + exit 0 ;; + sh*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + x86_64:Linux:*:*) + echo x86_64-unknown-linux-gnu + exit 0 ;; + i*86:Linux:*:*) + # The BFD linker knows what the default object file format is, so + # first see if it will tell us. cd to the root directory to prevent + # problems with other programs or directories called `ld' in the path. + # Set LC_ALL=C to ensure ld outputs messages in English. + ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ + | sed -ne '/supported targets:/!d + s/[ ][ ]*/ /g + s/.*supported targets: *// + s/ .*// + p'` + case "$ld_supported_targets" in + elf32-i386) + TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" + ;; + a.out-i386-linux) + echo "${UNAME_MACHINE}-pc-linux-gnuaout" + exit 0 ;; + coff-i386) + echo "${UNAME_MACHINE}-pc-linux-gnucoff" + exit 0 ;; + "") + # Either a pre-BFD a.out linker (linux-gnuoldld) or + # one that does not give us useful --help. + echo "${UNAME_MACHINE}-pc-linux-gnuoldld" + exit 0 ;; + esac + # Determine whether the default compiler is a.out or elf + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + #ifdef __ELF__ + # ifdef __GLIBC__ + # if __GLIBC__ >= 2 + LIBC=gnu + # else + LIBC=gnulibc1 + # endif + # else + LIBC=gnulibc1 + # endif + #else + #ifdef __INTEL_COMPILER + LIBC=gnu + #else + LIBC=gnuaout + #endif + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` + test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 + test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 + ;; + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both + # sysname and nodename. + echo i386-sequent-sysv4 + exit 0 ;; + i*86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + exit 0 ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo ${UNAME_MACHINE}-pc-os2-emx + exit 0 ;; + i*86:XTS-300:*:STOP) + echo ${UNAME_MACHINE}-unknown-stop + exit 0 ;; + i*86:atheos:*:*) + echo ${UNAME_MACHINE}-unknown-atheos + exit 0 ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + i*86:*DOS:*:*) + echo ${UNAME_MACHINE}-pc-msdosdjgpp + exit 0 ;; + i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) + UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} + else + echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} + fi + exit 0 ;; + i*86:*:5:[78]*) + case `/bin/uname -X | grep "^Machine"` in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; + esac + echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + exit 0 ;; + i*86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ + && UNAME_MACHINE=i686 + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ + && UNAME_MACHINE=i686 + echo ${UNAME_MACHINE}-pc-sco$UNAME_REL + else + echo ${UNAME_MACHINE}-pc-sysv32 + fi + exit 0 ;; + pc:*:*:*) + # Left here for compatibility: + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i386. + echo i386-pc-msdosdjgpp + exit 0 ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit 0 ;; + paragon:*:*:*) + echo i860-intel-osf1 + exit 0 ;; + i860:*:4.*:*) # i860-SVR4 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then + echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + fi + exit 0 ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv + exit 0 ;; + mc68k:UNIX:SYSTEM5:3.51m) + echo m68k-convergent-sysv + exit 0 ;; + M680?0:D-NIX:5.3:*) + echo m68k-diab-dnix + exit 0 ;; + M68*:*:R3V[567]*:*) + test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; + 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && echo i486-ncr-sysv4.3${OS_REL} && exit 0 + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && echo i486-ncr-sysv4 && exit 0 ;; + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) + echo m68k-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit 0 ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + rs6000:LynxOS:2.*:*) + echo rs6000-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) + echo powerpc-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv${UNAME_RELEASE} + exit 0 ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 + exit 0 ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit 0 ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` + echo ${UNAME_MACHINE}-sni-sysv4 + else + echo ns32k-sni-sysv + fi + exit 0 ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit 0 ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes . + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit 0 ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 + exit 0 ;; + *:VOS:*:*) + # From Paul.Green@stratus.com. + echo hppa1.1-stratus-vos + exit 0 ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux${UNAME_RELEASE} + exit 0 ;; + news*:NEWS-OS:6*:*) + echo mips-sony-newsos6 + exit 0 ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if [ -d /usr/nec ]; then + echo mips-nec-sysv${UNAME_RELEASE} + else + echo mips-unknown-sysv${UNAME_RELEASE} + fi + exit 0 ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos + exit 0 ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos + exit 0 ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos + exit 0 ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux${UNAME_RELEASE} + exit 0 ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux${UNAME_RELEASE} + exit 0 ;; + SX-6:SUPER-UX:*:*) + echo sx6-nec-superux${UNAME_RELEASE} + exit 0 ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody${UNAME_RELEASE} + exit 0 ;; + *:Rhapsody:*:*) + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} + exit 0 ;; + *:Darwin:*:*) + case `uname -p` in + *86) UNAME_PROCESSOR=i686 ;; + powerpc) UNAME_PROCESSOR=powerpc ;; + esac + echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} + exit 0 ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + UNAME_PROCESSOR=`uname -p` + if test "$UNAME_PROCESSOR" = "x86"; then + UNAME_PROCESSOR=i386 + UNAME_MACHINE=pc + fi + echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} + exit 0 ;; + *:QNX:*:4*) + echo i386-pc-qnx + exit 0 ;; + NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk${UNAME_RELEASE} + exit 0 ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux + exit 0 ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv + exit 0 ;; + DS/*:UNIX_System_V:*:*) + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} + exit 0 ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 + # operating systems. + if test "$cputype" = "386"; then + UNAME_MACHINE=i386 + else + UNAME_MACHINE="$cputype" + fi + echo ${UNAME_MACHINE}-unknown-plan9 + exit 0 ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 + exit 0 ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex + exit 0 ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 + exit 0 ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 + exit 0 ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 + exit 0 ;; + *:ITS:*:*) + echo pdp10-unknown-its + exit 0 ;; +esac + +#echo '(No uname command or uname output not recognized.)' 1>&2 +#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 + +eval $set_cc_for_build +cat >$dummy.c < +# include +#endif +main () +{ +#if defined (sony) +#if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); +#else +#include + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); +#endif +#endif + +#if defined (__arm) && defined (__acorn) && defined (__unix) + printf ("arm-acorn-riscix"); exit (0); +#endif + +#if defined (hp300) && !defined (hpux) + printf ("m68k-hp-bsd\n"); exit (0); +#endif + +#if defined (NeXT) +#if !defined (__ARCHITECTURE__) +#define __ARCHITECTURE__ "m68k" +#endif + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); + exit (0); +#endif + +#if defined (MULTIMAX) || defined (n16) +#if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); +#else +#if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); +#else + printf ("ns32k-encore-bsd\n"); exit (0); +#endif +#endif +#endif + +#if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); +#endif + +#if defined (sequent) +#if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); +#endif +#if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); +#endif +#endif + +#if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); + +#endif + +#if defined (vax) +# if !defined (ultrix) +# include +# if defined (BSD) +# if BSD == 43 + printf ("vax-dec-bsd4.3\n"); exit (0); +# else +# if BSD == 199006 + printf ("vax-dec-bsd4.3reno\n"); exit (0); +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# endif +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# else + printf ("vax-dec-ultrix\n"); exit (0); +# endif +#endif + +#if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); +#endif + + exit (1); +} +EOF + +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0 + +# Apollos put the system type in the environment. + +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } + +# Convex versions that predate uname can use getsysinfo(1) + +if [ -x /usr/convex/getsysinfo ] +then + case `getsysinfo -f cpu_type` in + c1*) + echo c1-convex-bsd + exit 0 ;; + c2*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit 0 ;; + c34*) + echo c34-convex-bsd + exit 0 ;; + c38*) + echo c38-convex-bsd + exit 0 ;; + c4*) + echo c4-convex-bsd + exit 0 ;; + esac +fi + +cat >&2 < in order to provide the needed +information to handle your system. + +config.guess timestamp = $timestamp + +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` + +hostinfo = `(hostinfo) 2>/dev/null` +/bin/universe = `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch = `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` + +UNAME_MACHINE = ${UNAME_MACHINE} +UNAME_RELEASE = ${UNAME_RELEASE} +UNAME_SYSTEM = ${UNAME_SYSTEM} +UNAME_VERSION = ${UNAME_VERSION} +EOF + +exit 1 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/config.sub b/config.sub new file mode 100644 index 0000000..1589de7 --- /dev/null +++ b/config.sub @@ -0,0 +1,1485 @@ +#! /bin/sh +# Configuration validation subroutine script. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. + +timestamp='2003-02-22' + +# This file is (in principle) common to ALL GNU software. +# The presence of a machine in this file suggests that SOME GNU software +# can handle that machine. It does not imply ALL GNU software can. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Please send patches to . Submit a context +# diff and a properly formatted ChangeLog entry. +# +# Configuration subroutine to validate and canonicalize a configuration type. +# Supply the specified configuration type as an argument. +# If it is invalid, we print an error message on stderr and exit with code 1. +# Otherwise, we print the canonical config type on stdout and succeed. + +# This file is supposed to be the same for all GNU packages +# and recognize all the CPU types, system types and aliases +# that are meaningful with *any* GNU software. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] CPU-MFR-OPSYS + $0 [OPTION] ALIAS + +Canonicalize a configuration name. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.sub ($timestamp) + +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit 0 ;; + --version | -v ) + echo "$version" ; exit 0 ;; + --help | --h* | -h ) + echo "$usage"; exit 0 ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" + exit 1 ;; + + *local*) + # First pass through any local machine types. + echo $1 + exit 0;; + + * ) + break ;; + esac +done + +case $# in + 0) echo "$me: missing argument$help" >&2 + exit 1;; + 1) ;; + *) echo "$me: too many arguments$help" >&2 + exit 1;; +esac + +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). +# Here we must recognize all the valid KERNEL-OS combinations. +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` +case $maybe_os in + nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; + *) + basic_machine=`echo $1 | sed 's/-[^-]*$//'` + if [ $basic_machine != $1 ] + then os=`echo $1 | sed 's/.*-/-/'` + else os=; fi + ;; +esac + +### Let's recognize common machines as not being operating systems so +### that things like config.sub decstation-3100 work. We also +### recognize some manufacturers as not being operating systems, so we +### can provide default operating systems below. +case $os in + -sun*os*) + # Prevent following clause from handling this invalid input. + ;; + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ + -apple | -axis) + os= + basic_machine=$1 + ;; + -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 + ;; + -scout) + ;; + -wrs) + os=-vxworks + basic_machine=$1 + ;; + -chorusos*) + os=-chorusos + basic_machine=$1 + ;; + -chorusrdb) + os=-chorusrdb + basic_machine=$1 + ;; + -hiux*) + os=-hiuxwe2 + ;; + -sco5) + os=-sco3.2v5 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco4) + os=-sco3.2v4 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2v[4-9]*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco*) + os=-sco3.2v2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -udk*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -isc) + os=-isc2.2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -clix*) + basic_machine=clipper-intergraph + ;; + -isc*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -lynx*) + os=-lynxos + ;; + -ptx*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` + ;; + -windowsnt*) + os=`echo $os | sed -e 's/windowsnt/winnt/'` + ;; + -psos*) + os=-psos + ;; + -mint | -mint[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; +esac + +# Decode aliases for certain CPU-COMPANY combinations. +case $basic_machine in + # Recognize the basic CPU types without company name. + # Some are omitted here because they have special meanings below. + 1750a | 580 \ + | a29k \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ + | clipper \ + | d10v | d30v | dlx | dsp16xx \ + | fr30 | frv \ + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | i370 | i860 | i960 | ia64 \ + | ip2k \ + | m32r | m68000 | m68k | m88k | mcore \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ + | mips64vr | mips64vrel \ + | mips64orion | mips64orionel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipstx39 | mipstx39el \ + | mn10200 | mn10300 \ + | msp430 \ + | ns16k | ns32k \ + | openrisc | or32 \ + | pdp10 | pdp11 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ + | pyramid \ + | s390 | s390x \ + | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ + | sh64 | sh64le \ + | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \ + | strongarm \ + | tahoe | thumb | tic80 | tron \ + | v850 | v850e \ + | we32k \ + | x86 | xscale | xstormy16 | xtensa \ + | z8k) + basic_machine=$basic_machine-unknown + ;; + m6811 | m68hc11 | m6812 | m68hc12) + # Motorola 68HC11/12. + basic_machine=$basic_machine-unknown + os=-none + ;; + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) + ;; + + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and + # (2) the word "unknown" tends to confuse beginning users. + i*86 | x86_64) + basic_machine=$basic_machine-pc + ;; + # Object if more than one company name word. + *-*-*) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; + # Recognize the basic CPU types with company name. + 580-* \ + | a29k-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ + | avr-* \ + | bs2000-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ + | clipper-* | cydra-* \ + | d10v-* | d30v-* | dlx-* \ + | elxsi-* \ + | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ + | h8300-* | h8500-* \ + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | i*86-* | i860-* | i960-* | ia64-* \ + | ip2k-* \ + | m32r-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ + | m88110-* | m88k-* | mcore-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ + | mips64vr-* | mips64vrel-* \ + | mips64orion-* | mips64orionel-* \ + | mips64vr4100-* | mips64vr4100el-* \ + | mips64vr4300-* | mips64vr4300el-* \ + | mips64vr5000-* | mips64vr5000el-* \ + | mipsisa32-* | mipsisa32el-* \ + | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa64-* | mipsisa64el-* \ + | mipsisa64sb1-* | mipsisa64sb1el-* \ + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipstx39-* | mipstx39el-* \ + | msp430-* \ + | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ + | pyramid-* \ + | romp-* | rs6000-* \ + | s390-* | s390x-* \ + | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ + | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ + | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ + | tahoe-* | thumb-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tron-* \ + | v850-* | v850e-* | vax-* \ + | we32k-* \ + | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \ + | xtensa-* \ + | ymp-* \ + | z8k-*) + ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 386bsd) + basic_machine=i386-unknown + os=-bsd + ;; + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + basic_machine=m68000-att + ;; + 3b*) + basic_machine=we32k-att + ;; + a29khif) + basic_machine=a29k-amd + os=-udi + ;; + adobe68k) + basic_machine=m68010-adobe + os=-scout + ;; + alliant | fx80) + basic_machine=fx80-alliant + ;; + altos | altos3068) + basic_machine=m68k-altos + ;; + am29k) + basic_machine=a29k-none + os=-bsd + ;; + amdahl) + basic_machine=580-amdahl + os=-sysv + ;; + amiga | amiga-*) + basic_machine=m68k-unknown + ;; + amigaos | amigados) + basic_machine=m68k-unknown + os=-amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + os=-sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=-sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + os=-bsd + ;; + aux) + basic_machine=m68k-apple + os=-aux + ;; + balance) + basic_machine=ns32k-sequent + os=-dynix + ;; + c90) + basic_machine=c90-cray + os=-unicos + ;; + convex-c1) + basic_machine=c1-convex + os=-bsd + ;; + convex-c2) + basic_machine=c2-convex + os=-bsd + ;; + convex-c32) + basic_machine=c32-convex + os=-bsd + ;; + convex-c34) + basic_machine=c34-convex + os=-bsd + ;; + convex-c38) + basic_machine=c38-convex + os=-bsd + ;; + cray | j90) + basic_machine=j90-cray + os=-unicos + ;; + crds | unos) + basic_machine=m68k-crds + ;; + cris | cris-* | etrax*) + basic_machine=cris-axis + ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) + basic_machine=mips-dec + ;; + decsystem10* | dec10*) + basic_machine=pdp10-dec + os=-tops10 + ;; + decsystem20* | dec20*) + basic_machine=pdp10-dec + os=-tops20 + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + basic_machine=m68k-motorola + ;; + delta88) + basic_machine=m88k-motorola + os=-sysv3 + ;; + dpx20 | dpx20-*) + basic_machine=rs6000-bull + os=-bosx + ;; + dpx2* | dpx2*-bull) + basic_machine=m68k-bull + os=-sysv3 + ;; + ebmon29k) + basic_machine=a29k-amd + os=-ebmon + ;; + elxsi) + basic_machine=elxsi-elxsi + os=-bsd + ;; + encore | umax | mmax) + basic_machine=ns32k-encore + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=-ose + ;; + fx2800) + basic_machine=i860-alliant + ;; + genix) + basic_machine=ns32k-ns + ;; + gmicro) + basic_machine=tron-gmicro + os=-sysv + ;; + go32) + basic_machine=i386-pc + os=-go32 + ;; + h3050r* | hiux*) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=-hms + ;; + h8300xray) + basic_machine=h8300-hitachi + os=-xray + ;; + h8500hms) + basic_machine=h8500-hitachi + os=-hms + ;; + harris) + basic_machine=m88k-harris + os=-sysv3 + ;; + hp300-*) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=-bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=-hpux + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + basic_machine=m68000-hp + ;; + hp9k3[2-9][0-9]) + basic_machine=m68k-hp + ;; + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + basic_machine=hppa1.1-hp + ;; + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hppa-next) + os=-nextstep3 + ;; + hppaosf) + basic_machine=hppa1.1-hp + os=-osf + ;; + hppro) + basic_machine=hppa1.1-hp + os=-proelf + ;; + i370-ibm* | ibm*) + basic_machine=i370-ibm + ;; +# I'm not sure what "Sysv32" means. Should this be sysv3.2? + i*86v32) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv32 + ;; + i*86v4*) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv4 + ;; + i*86v) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv + ;; + i*86sol2) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-solaris2 + ;; + i386mach) + basic_machine=i386-mach + os=-mach + ;; + i386-vsta | vsta) + basic_machine=i386-unknown + os=-vsta + ;; + iris | iris4d) + basic_machine=mips-sgi + case $os in + -irix*) + ;; + *) + os=-irix4 + ;; + esac + ;; + isi68 | isi) + basic_machine=m68k-isi + os=-sysv + ;; + m88k-omron*) + basic_machine=m88k-omron + ;; + magnum | m3230) + basic_machine=mips-mips + os=-sysv + ;; + merlin) + basic_machine=ns32k-utek + os=-sysv + ;; + mingw32) + basic_machine=i386-pc + os=-mingw32 + ;; + miniframe) + basic_machine=m68000-convergent + ;; + *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; + mips3*-*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` + ;; + mips3*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown + ;; + mmix*) + basic_machine=mmix-knuth + os=-mmixware + ;; + monitor) + basic_machine=m68k-rom68k + os=-coff + ;; + morphos) + basic_machine=powerpc-unknown + os=-morphos + ;; + msdos) + basic_machine=i386-pc + os=-msdos + ;; + mvs) + basic_machine=i370-ibm + os=-mvs + ;; + ncr3000) + basic_machine=i486-ncr + os=-sysv4 + ;; + netbsd386) + basic_machine=i386-unknown + os=-netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + os=-linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=-newsos + ;; + news1000) + basic_machine=m68030-sony + os=-newsos + ;; + news-3600 | risc-news) + basic_machine=mips-sony + os=-newsos + ;; + necv70) + basic_machine=v70-nec + os=-sysv + ;; + next | m*-next ) + basic_machine=m68k-next + case $os in + -nextstep* ) + ;; + -ns2*) + os=-nextstep2 + ;; + *) + os=-nextstep3 + ;; + esac + ;; + nh3000) + basic_machine=m68k-harris + os=-cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=-cxux + ;; + nindy960) + basic_machine=i960-intel + os=-nindy + ;; + mon960) + basic_machine=i960-intel + os=-mon960 + ;; + nonstopux) + basic_machine=mips-compaq + os=-nonstopux + ;; + np1) + basic_machine=np1-gould + ;; + nv1) + basic_machine=nv1-cray + os=-unicosmp + ;; + nsr-tandem) + basic_machine=nsr-tandem + ;; + op50n-* | op60c-*) + basic_machine=hppa1.1-oki + os=-proelf + ;; + or32 | or32-*) + basic_machine=or32-unknown + os=-coff + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=-ose + ;; + os68k) + basic_machine=m68k-none + os=-os68k + ;; + pa-hitachi) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + paragon) + basic_machine=i860-intel + os=-osf + ;; + pbd) + basic_machine=sparc-tti + ;; + pbb) + basic_machine=m68k-tti + ;; + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; + pentium | p5 | k5 | k6 | nexgen | viac3) + basic_machine=i586-pc + ;; + pentiumpro | p6 | 6x86 | athlon | athlon_*) + basic_machine=i686-pc + ;; + pentiumii | pentium2) + basic_machine=i686-pc + ;; + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) + basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumpro-* | p6-* | 6x86-* | athlon-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumii-* | pentium2-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pn) + basic_machine=pn-gould + ;; + power) basic_machine=power-ibm + ;; + ppc) basic_machine=powerpc-unknown + ;; + ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppcle | powerpclittle | ppc-le | powerpc-little) + basic_machine=powerpcle-unknown + ;; + ppcle-* | powerpclittle-*) + basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64) basic_machine=powerpc64-unknown + ;; + ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64le | powerpc64little | ppc64-le | powerpc64-little) + basic_machine=powerpc64le-unknown + ;; + ppc64le-* | powerpc64little-*) + basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ps2) + basic_machine=i386-ibm + ;; + pw32) + basic_machine=i586-unknown + os=-pw32 + ;; + rom68k) + basic_machine=m68k-rom68k + os=-coff + ;; + rm[46]00) + basic_machine=mips-siemens + ;; + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; + sa29200) + basic_machine=a29k-amd + os=-udi + ;; + sb1) + basic_machine=mipsisa64sb1-unknown + ;; + sb1el) + basic_machine=mipsisa64sb1el-unknown + ;; + sequent) + basic_machine=i386-sequent + ;; + sh) + basic_machine=sh-hitachi + os=-hms + ;; + sparclite-wrs | simso-wrs) + basic_machine=sparclite-wrs + os=-vxworks + ;; + sps7) + basic_machine=m68k-bull + os=-sysv2 + ;; + spur) + basic_machine=spur-unknown + ;; + st2000) + basic_machine=m68k-tandem + ;; + stratus) + basic_machine=i860-stratus + os=-sysv4 + ;; + sun2) + basic_machine=m68000-sun + ;; + sun2os3) + basic_machine=m68000-sun + os=-sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=-sunos4 + ;; + sun3os3) + basic_machine=m68k-sun + os=-sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=-sunos4 + ;; + sun4os3) + basic_machine=sparc-sun + os=-sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=-sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=-solaris2 + ;; + sun3 | sun3-*) + basic_machine=m68k-sun + ;; + sun4) + basic_machine=sparc-sun + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + ;; + sv1) + basic_machine=sv1-cray + os=-unicos + ;; + symmetry) + basic_machine=i386-sequent + os=-dynix + ;; + t3e) + basic_machine=alphaev5-cray + os=-unicos + ;; + t90) + basic_machine=t90-cray + os=-unicos + ;; + tic4x | c4x*) + basic_machine=tic4x-unknown + os=-coff + ;; + tic54x | c54x*) + basic_machine=tic54x-unknown + os=-coff + ;; + tic55x | c55x*) + basic_machine=tic55x-unknown + os=-coff + ;; + tic6x | c6x*) + basic_machine=tic6x-unknown + os=-coff + ;; + tx39) + basic_machine=mipstx39-unknown + ;; + tx39el) + basic_machine=mipstx39el-unknown + ;; + toad1) + basic_machine=pdp10-xkl + os=-tops20 + ;; + tower | tower-32) + basic_machine=m68k-ncr + ;; + udi29k) + basic_machine=a29k-amd + os=-udi + ;; + ultra3) + basic_machine=a29k-nyu + os=-sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + os=-none + ;; + vaxv) + basic_machine=vax-dec + os=-sysv + ;; + vms) + basic_machine=vax-dec + os=-vms + ;; + vpp*|vx|vx-*) + basic_machine=f301-fujitsu + ;; + vxworks960) + basic_machine=i960-wrs + os=-vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=-vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=-vxworks + ;; + w65*) + basic_machine=w65-wdc + os=-none + ;; + w89k-*) + basic_machine=hppa1.1-winbond + os=-proelf + ;; + xps | xps100) + basic_machine=xps100-honeywell + ;; + ymp) + basic_machine=ymp-cray + os=-unicos + ;; + z8k-*-coff) + basic_machine=z8k-unknown + os=-sim + ;; + none) + basic_machine=none-none + os=-none + ;; + +# Here we handle the default manufacturer of certain CPU types. It is in +# some cases the only manufacturer, in others, it is the most popular. + w89k) + basic_machine=hppa1.1-winbond + ;; + op50n) + basic_machine=hppa1.1-oki + ;; + op60c) + basic_machine=hppa1.1-oki + ;; + romp) + basic_machine=romp-ibm + ;; + rs6000) + basic_machine=rs6000-ibm + ;; + vax) + basic_machine=vax-dec + ;; + pdp10) + # there are many clones, so DEC is not a safe bet + basic_machine=pdp10-unknown + ;; + pdp11) + basic_machine=pdp11-dec + ;; + we32k) + basic_machine=we32k-att + ;; + sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) + basic_machine=sh-unknown + ;; + sh64) + basic_machine=sh64-unknown + ;; + sparc | sparcv9 | sparcv9b) + basic_machine=sparc-sun + ;; + cydra) + basic_machine=cydra-cydrome + ;; + orion) + basic_machine=orion-highlevel + ;; + orion105) + basic_machine=clipper-highlevel + ;; + mac | mpw | mac-mpw) + basic_machine=m68k-apple + ;; + pmac | pmac-mpw) + basic_machine=powerpc-apple + ;; + *-unknown) + # Make sure to match an already-canonicalized machine name. + ;; + *) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; +esac + +# Here we canonicalize certain aliases for manufacturers. +case $basic_machine in + *-digital*) + basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` + ;; + *-commodore*) + basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` + ;; + *) + ;; +esac + +# Decode manufacturer-specific aliases for certain operating systems. + +if [ x"$os" != x"" ] +then +case $os in + # First match some system type aliases + # that might get confused with valid system types. + # -solaris* is a basic system type, with this one exception. + -solaris1 | -solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; + -solaris) + os=-solaris2 + ;; + -svr4*) + os=-sysv4 + ;; + -unixware*) + os=-sysv4.2uw + ;; + -gnu/linux*) + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` + ;; + # First accept the basic system types. + # The portable systems comes first. + # Each alternative MUST END IN A *, to match a version number. + # -sysv* is not here because it comes later, after sysvr4. + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ + | -aos* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ + | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -chorusos* | -chorusrdb* \ + | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ + | -powermax* | -dnix*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -qnx*) + case $basic_machine in + x86-* | i*86-*) + ;; + *) + os=-nto$os + ;; + esac + ;; + -nto-qnx*) + ;; + -nto*) + os=`echo $os | sed -e 's|nto|nto-qnx|'` + ;; + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ + | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) + ;; + -mac*) + os=`echo $os | sed -e 's|mac|macos|'` + ;; + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; + -sunos5*) + os=`echo $os | sed -e 's|sunos5|solaris2|'` + ;; + -sunos6*) + os=`echo $os | sed -e 's|sunos6|solaris3|'` + ;; + -opened*) + os=-openedition + ;; + -wince*) + os=-wince + ;; + -osfrose*) + os=-osfrose + ;; + -osf*) + os=-osf + ;; + -utek*) + os=-bsd + ;; + -dynix*) + os=-bsd + ;; + -acis*) + os=-aos + ;; + -atheos*) + os=-atheos + ;; + -386bsd) + os=-bsd + ;; + -ctix* | -uts*) + os=-sysv + ;; + -nova*) + os=-rtmk-nova + ;; + -ns2 ) + os=-nextstep2 + ;; + -nsk*) + os=-nsk + ;; + # Preserve the version number of sinix5. + -sinix5.*) + os=`echo $os | sed -e 's|sinix|sysv|'` + ;; + -sinix*) + os=-sysv4 + ;; + -triton*) + os=-sysv3 + ;; + -oss*) + os=-sysv3 + ;; + -svr4) + os=-sysv4 + ;; + -svr3) + os=-sysv3 + ;; + -sysvr4) + os=-sysv4 + ;; + # This must come after -sysvr4. + -sysv*) + ;; + -ose*) + os=-ose + ;; + -es1800*) + os=-ose + ;; + -xenix) + os=-xenix + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + os=-mint + ;; + -aros*) + os=-aros + ;; + -kaos*) + os=-kaos + ;; + -none) + ;; + *) + # Get rid of the `-' at the beginning of $os. + os=`echo $os | sed 's/[^-]*-//'` + echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 + exit 1 + ;; +esac +else + +# Here we handle the default operating systems that come with various machines. +# The value should be what the vendor currently ships out the door with their +# machine or put another way, the most popular os provided with the machine. + +# Note that if you're going to try to match "-MANUFACTURER" here (say, +# "-sun"), then you have to tell the case statement up towards the top +# that MANUFACTURER isn't an operating system. Otherwise, code above +# will signal an error saying that MANUFACTURER isn't an operating +# system, and we'll never get to this point. + +case $basic_machine in + *-acorn) + os=-riscix1.2 + ;; + arm*-rebel) + os=-linux + ;; + arm*-semi) + os=-aout + ;; + # This must come before the *-dec entry. + pdp10-*) + os=-tops20 + ;; + pdp11-*) + os=-none + ;; + *-dec | vax-*) + os=-ultrix4.2 + ;; + m68*-apollo) + os=-domain + ;; + i386-sun) + os=-sunos4.0.2 + ;; + m68000-sun) + os=-sunos3 + # This also exists in the configure program, but was not the + # default. + # os=-sunos4 + ;; + m68*-cisco) + os=-aout + ;; + mips*-cisco) + os=-elf + ;; + mips*-*) + os=-elf + ;; + or32-*) + os=-coff + ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=-sysv3 + ;; + sparc-* | *-sun) + os=-sunos4.1.1 + ;; + *-be) + os=-beos + ;; + *-ibm) + os=-aix + ;; + *-wec) + os=-proelf + ;; + *-winbond) + os=-proelf + ;; + *-oki) + os=-proelf + ;; + *-hp) + os=-hpux + ;; + *-hitachi) + os=-hiux + ;; + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) + os=-sysv + ;; + *-cbm) + os=-amigaos + ;; + *-dg) + os=-dgux + ;; + *-dolphin) + os=-sysv3 + ;; + m68k-ccur) + os=-rtu + ;; + m88k-omron*) + os=-luna + ;; + *-next ) + os=-nextstep + ;; + *-sequent) + os=-ptx + ;; + *-crds) + os=-unos + ;; + *-ns) + os=-genix + ;; + i370-*) + os=-mvs + ;; + *-next) + os=-nextstep3 + ;; + *-gould) + os=-sysv + ;; + *-highlevel) + os=-bsd + ;; + *-encore) + os=-bsd + ;; + *-sgi) + os=-irix + ;; + *-siemens) + os=-sysv4 + ;; + *-masscomp) + os=-rtu + ;; + f30[01]-fujitsu | f700-fujitsu) + os=-uxpv + ;; + *-rom68k) + os=-coff + ;; + *-*bug) + os=-coff + ;; + *-apple) + os=-macos + ;; + *-atari*) + os=-mint + ;; + *) + os=-none + ;; +esac +fi + +# Here we handle the case where we know the os, and the CPU type, but not the +# manufacturer. We pick the logical manufacturer. +vendor=unknown +case $basic_machine in + *-unknown) + case $os in + -riscix*) + vendor=acorn + ;; + -sunos*) + vendor=sun + ;; + -aix*) + vendor=ibm + ;; + -beos*) + vendor=be + ;; + -hpux*) + vendor=hp + ;; + -mpeix*) + vendor=hp + ;; + -hiux*) + vendor=hitachi + ;; + -unos*) + vendor=crds + ;; + -dgux*) + vendor=dg + ;; + -luna*) + vendor=omron + ;; + -genix*) + vendor=ns + ;; + -mvs* | -opened*) + vendor=ibm + ;; + -ptx*) + vendor=sequent + ;; + -vxsim* | -vxworks* | -windiss*) + vendor=wrs + ;; + -aux*) + vendor=apple + ;; + -hms*) + vendor=hitachi + ;; + -mpw* | -macos*) + vendor=apple + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + vendor=atari + ;; + -vos*) + vendor=stratus + ;; + esac + basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` + ;; +esac + +echo $basic_machine$os +exit 0 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index f9f64f6..a6425b8 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -1,7 +1,7 @@ Summary: Red Hat specific rpm configuration files. Name: redhat-rpm-config -Version: 8.0.23 -Release: 2 +Version: 8.0.24 +Release: 1 License: GPL Group: Development/System Source: redhat-rpm-config-%{version}.tar.gz @@ -28,7 +28,7 @@ rm -rf ${RPM_BUILD_ROOT} %{_prefix}/lib/rpm/redhat %changelog -* Fri May 2 2003 Jens Petersen - 8.0.23-1 +* Fri May 2 2003 Jens Petersen - 8.0.24-1 - make config.{guess,sub} executable * Thu May 1 2003 Jens Petersen - 8.0.22-2 From dec5bd1983641e999761a0110f83982b7023f852 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 2 May 2003 10:00:46 +0000 Subject: [PATCH 068/213] 8.0.24-2 - force config.{guess,sub} executable by chmod in spec file. --- redhat-rpm-config.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index a6425b8..2e994b7 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -1,7 +1,7 @@ Summary: Red Hat specific rpm configuration files. Name: redhat-rpm-config Version: 8.0.24 -Release: 1 +Release: 2 License: GPL Group: Development/System Source: redhat-rpm-config-%{version}.tar.gz @@ -20,6 +20,9 @@ rm -rf ${RPM_BUILD_ROOT} mkdir -p ${RPM_BUILD_ROOT}%{_prefix}/lib/rpm ( cd ${RPM_BUILD_ROOT}%{_prefix}/lib/rpm; tar xzf %{SOURCE0}; mv %{name}-%{version} redhat; rm -f redhat/*.spec ) +# fix perms of config.{guess,sub} +chmod a+x ${RPM_BUILD_ROOT}%{_prefix}/lib/rpm/redhat/config.{guess,sub} + %clean rm -rf ${RPM_BUILD_ROOT} @@ -28,7 +31,7 @@ rm -rf ${RPM_BUILD_ROOT} %{_prefix}/lib/rpm/redhat %changelog -* Fri May 2 2003 Jens Petersen - 8.0.24-1 +* Fri May 2 2003 Jens Petersen - 8.0.24-2 - make config.{guess,sub} executable * Thu May 1 2003 Jens Petersen - 8.0.22-2 From fb0d40d7ad1a3c5766ff57e015f02015669e4c86 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 2 May 2003 10:05:02 +0000 Subject: [PATCH 069/213] For Cambridge too. --- redhat-rpm-config.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index 2e994b7..45614cc 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -1,7 +1,7 @@ Summary: Red Hat specific rpm configuration files. Name: redhat-rpm-config Version: 8.0.24 -Release: 2 +Release: 3 License: GPL Group: Development/System Source: redhat-rpm-config-%{version}.tar.gz @@ -31,7 +31,7 @@ rm -rf ${RPM_BUILD_ROOT} %{_prefix}/lib/rpm/redhat %changelog -* Fri May 2 2003 Jens Petersen - 8.0.24-2 +* Fri May 2 2003 Jens Petersen - 8.0.24-3 - make config.{guess,sub} executable * Thu May 1 2003 Jens Petersen - 8.0.22-2 From 7bf42f4c8de0b93f5ab7fc22fb841bb46bf7eb0c Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 7 Jul 2003 01:18:33 +0000 Subject: [PATCH 070/213] * Mon Jul 07 2003 Jens Petersen - 8.0.25-1 - update config.{guess,sub} to 2003-06-17 - define VENDOR to be redhat only when /etc/redhat-release present [suggested by jbj] - put VENDOR in vendor field in our config.guess file for ia64, ppc, ppc64, s390, s390x, x86_64 and elf32-i386 Linux - drop the --host, --build, --target and --program-prefix configure options from %%configure, since this causes far too many problems --- config.guess | 44 +++++++++++++++++++++++++++++++----------- config.sub | 35 +++++++++++++++++++++++---------- macros | 7 ++----- redhat-rpm-config.spec | 13 +++++++++++-- 4 files changed, 71 insertions(+), 28 deletions(-) diff --git a/config.guess b/config.guess index cc726cd..65b156c 100644 --- a/config.guess +++ b/config.guess @@ -3,7 +3,7 @@ # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003 Free Software Foundation, Inc. -timestamp='2003-02-22' +timestamp='2003-06-17' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -106,6 +106,7 @@ trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; @@ -135,6 +136,12 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown +## for Red Hat Linux +VENDOR=unknown +if test -f /etc/redhat-release ; then + VENDOR=redhat +fi + # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in @@ -282,6 +289,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit 0 ;; + Alpha*:OpenVMS:*:*) + echo alpha-hp-vms + exit 0 ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead @@ -320,6 +330,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit 0 ;; + DRS?6000:unix:4.0:6*) + echo sparc-icl-nx6 + exit 0 ;; DRS?6000:UNIX_SV:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7 && exit 0 ;; @@ -744,7 +757,7 @@ EOF *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit 0 ;; - *:FreeBSD:*:*) + *:FreeBSD:*:*|*:GNU/FreeBSD:*:*) # Determine whether the default compiler uses glibc. eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c @@ -767,8 +780,8 @@ EOF i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit 0 ;; - x86:Interix*:3*) - echo i586-pc-interix3 + x86:Interix*:[34]*) + echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' exit 0 ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks @@ -797,8 +810,11 @@ EOF arm*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; + cris:Linux:*:*) + echo cris-axis-linux-gnu + exit 0 ;; ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu exit 0 ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu @@ -842,10 +858,10 @@ EOF test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 ;; ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu + echo powerpc-${VENDOR}-linux-gnu exit 0 ;; ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu + echo powerpc64-${VENDOR}-linux-gnu exit 0 ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in @@ -873,7 +889,10 @@ EOF echo hppa64-unknown-linux-gnu exit 0 ;; s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux + echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu + exit 0 ;; + sh64*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu @@ -882,7 +901,7 @@ EOF echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu + echo x86_64-${VENDOR}-linux-gnu exit 0 ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so @@ -897,7 +916,7 @@ EOF p'` case "$ld_supported_targets" in elf32-i386) - TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" + TENTATIVE="${UNAME_MACHINE}-${VENDOR}-linux-gnu" ;; a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" @@ -1033,7 +1052,7 @@ EOF exit 0 ;; M68*:*:R3V[567]*:*) test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; - 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0) + 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` @@ -1189,6 +1208,9 @@ EOF *:ITS:*:*) echo pdp10-unknown-its exit 0 ;; + SEI:*:*:SEIUX) + echo mips-sei-seiux${UNAME_RELEASE} + exit 0 ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 diff --git a/config.sub b/config.sub index 1589de7..7cee3d6 100644 --- a/config.sub +++ b/config.sub @@ -3,7 +3,7 @@ # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003 Free Software Foundation, Inc. -timestamp='2003-02-22' +timestamp='2003-06-18' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -229,7 +229,7 @@ case $basic_machine in | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ - | clipper \ + | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ @@ -262,7 +262,7 @@ case $basic_machine in | sh64 | sh64le \ | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \ | strongarm \ - | tahoe | thumb | tic80 | tron \ + | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ | x86 | xscale | xstormy16 | xtensa \ @@ -375,6 +375,9 @@ case $basic_machine in basic_machine=a29k-none os=-bsd ;; + amd64) + basic_machine=x86_64-pc + ;; amdahl) basic_machine=580-amdahl os=-sysv @@ -770,18 +773,24 @@ case $basic_machine in pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; - pentiumii | pentium2) + pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; + pentium4) + basic_machine=i786-pc + ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; - pentiumii-* | pentium2-*) + pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; + pentium4-*) + basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; pn) basic_machine=pn-gould ;; @@ -834,6 +843,10 @@ case $basic_machine in sb1el) basic_machine=mipsisa64sb1el-unknown ;; + sei) + basic_machine=mips-sei + os=-seiux + ;; sequent) basic_machine=i386-sequent ;; @@ -841,6 +854,9 @@ case $basic_machine in basic_machine=sh-hitachi os=-hms ;; + sh64) + basic_machine=sh64-unknown + ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks @@ -915,10 +931,6 @@ case $basic_machine in basic_machine=t90-cray os=-unicos ;; - tic4x | c4x*) - basic_machine=tic4x-unknown - os=-coff - ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff @@ -1124,7 +1136,7 @@ case $os in | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ - | -powermax* | -dnix*) + | -powermax* | -dnix* | -nx6 | -nx7 | -sei*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1270,6 +1282,9 @@ case $basic_machine in arm*-semi) os=-aout ;; + c4x-* | tic4x-*) + os=-coff + ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 diff --git a/macros b/macros index 04a3640..e2c34b7 100644 --- a/macros +++ b/macros @@ -30,13 +30,10 @@ CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \ CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \ FFLAGS="${FFLAGS:-%optflags}" ; export FFLAGS ; \ - for i in $(find . -name config.guess 2>/dev/null) $(find . -name config.sub 2>/dev/null) ; do \ + for i in $(find . -name config.guess -o config.sub 2>/dev/null) ; do \ [ -f /usr/lib/rpm/redhat/$(basename $i) ] && %{__rm} -f $i && %{__cp} -fv /usr/lib/rpm/redhat/$(basename $i) $i ; \ done ; \ - ./configure --host=%{_host} --build=%{_build} \\\ - --target=%{_target_platform} \\\ - --program-prefix=%{?_program_prefix:%{_program_prefix}} \\\ - --prefix=%{_prefix} \\\ + ./configure --prefix=%{_prefix} \\\ --exec-prefix=%{_exec_prefix} \\\ --bindir=%{_bindir} \\\ --sbindir=%{_sbindir} \\\ diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index 45614cc..a3d8476 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -1,7 +1,7 @@ Summary: Red Hat specific rpm configuration files. Name: redhat-rpm-config -Version: 8.0.24 -Release: 3 +Version: 8.0.25 +Release: 1 License: GPL Group: Development/System Source: redhat-rpm-config-%{version}.tar.gz @@ -31,6 +31,15 @@ rm -rf ${RPM_BUILD_ROOT} %{_prefix}/lib/rpm/redhat %changelog +* Mon Jul 07 2003 Jens Petersen - 8.0.25-1 +- update config.{guess,sub} to 2003-06-17 +- define VENDOR to be redhat only when /etc/redhat-release present + [suggested by jbj] +- put VENDOR in vendor field in our config.guess file for + ia64, ppc, ppc64, s390, s390x, x86_64 and elf32-i386 Linux +- drop the --host, --build, --target and --program-prefix configure options + from %%configure, since this causes far too many problems + * Fri May 2 2003 Jens Petersen - 8.0.24-3 - make config.{guess,sub} executable From 9d388dbd199f0f73e514337708c947cb630a9295 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 7 Jul 2003 02:32:13 +0000 Subject: [PATCH 071/213] * Mon Jul 7 2003 Jens Petersen - 8.0.26-1 - preserve the vendor field when VENDOR not set - put VENDOR in the final i386-libc line, not the tentative one --- config.guess | 19 ++++++++++--------- redhat-rpm-config.spec | 8 ++++++-- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/config.guess b/config.guess index 65b156c..2fc3acc 100644 --- a/config.guess +++ b/config.guess @@ -137,9 +137,10 @@ UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown ## for Red Hat Linux -VENDOR=unknown if test -f /etc/redhat-release ; then - VENDOR=redhat + VENDOR=redhat ; +else + VENDOR= ; fi # Note: order is significant - the case branches are not exclusive. @@ -814,7 +815,7 @@ EOF echo cris-axis-linux-gnu exit 0 ;; ia64:Linux:*:*) - echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu + echo ${UNAME_MACHINE}-${VENDOR:-unknown}-linux-gnu exit 0 ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu @@ -858,10 +859,10 @@ EOF test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 ;; ppc:Linux:*:*) - echo powerpc-${VENDOR}-linux-gnu + echo powerpc-${VENDOR:-unknown}-linux-gnu exit 0 ;; ppc64:Linux:*:*) - echo powerpc64-${VENDOR}-linux-gnu + echo powerpc64-${VENDOR:-unknown}-linux-gnu exit 0 ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in @@ -889,7 +890,7 @@ EOF echo hppa64-unknown-linux-gnu exit 0 ;; s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu + echo ${UNAME_MACHINE}-${VENDOR:-ibm}-linux-gnu exit 0 ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu @@ -901,7 +902,7 @@ EOF echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; x86_64:Linux:*:*) - echo x86_64-${VENDOR}-linux-gnu + echo x86_64-${VENDOR:-unknown}-linux-gnu exit 0 ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so @@ -916,7 +917,7 @@ EOF p'` case "$ld_supported_targets" in elf32-i386) - TENTATIVE="${UNAME_MACHINE}-${VENDOR}-linux-gnu" + TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" ;; a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" @@ -953,7 +954,7 @@ EOF #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` - test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 + test x"${LIBC}" != x && echo "${UNAME_MACHINE}-${VENDOR:-pc}-linux-${LIBC}" && exit 0 test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 ;; i*86:DYNIX/ptx:4*:*) diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index a3d8476..15be672 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -1,6 +1,6 @@ Summary: Red Hat specific rpm configuration files. Name: redhat-rpm-config -Version: 8.0.25 +Version: 8.0.26 Release: 1 License: GPL Group: Development/System @@ -31,7 +31,11 @@ rm -rf ${RPM_BUILD_ROOT} %{_prefix}/lib/rpm/redhat %changelog -* Mon Jul 07 2003 Jens Petersen - 8.0.25-1 +* Mon Jul 7 2003 Jens Petersen - 8.0.26-1 +- preserve the vendor field when VENDOR not set +- put VENDOR in the final i386-libc line, not the tentative one + +* Mon Jul 7 2003 Jens Petersen - 8.0.25-1 - update config.{guess,sub} to 2003-06-17 - define VENDOR to be redhat only when /etc/redhat-release present [suggested by jbj] From a2894a5e9a3ee9cb1c7344b59b9aba6dee6b79df Mon Sep 17 00:00:00 2001 From: Elliot Lee Date: Tue, 15 Jul 2003 13:38:58 +0000 Subject: [PATCH 072/213] 8.0.27-1 --- macros | 7 +++++-- redhat-rpm-config.spec | 6 +++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/macros b/macros index e2c34b7..5168d9c 100644 --- a/macros +++ b/macros @@ -30,10 +30,13 @@ CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \ CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \ FFLAGS="${FFLAGS:-%optflags}" ; export FFLAGS ; \ - for i in $(find . -name config.guess -o config.sub 2>/dev/null) ; do \ + for i in $(find . -name config.guess -o -name config.sub) ; do \ [ -f /usr/lib/rpm/redhat/$(basename $i) ] && %{__rm} -f $i && %{__cp} -fv /usr/lib/rpm/redhat/$(basename $i) $i ; \ done ; \ - ./configure --prefix=%{_prefix} \\\ + ./configure --host=%{_host} --build=%{_build} \\\ + --target=%{_target_platform} \\\ + --program_prefix=%{?_program_prefix} \\\ + --prefix=%{_prefix} \\\ --exec-prefix=%{_exec_prefix} \\\ --bindir=%{_bindir} \\\ --sbindir=%{_sbindir} \\\ diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index 15be672..04ff257 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -1,6 +1,6 @@ Summary: Red Hat specific rpm configuration files. Name: redhat-rpm-config -Version: 8.0.26 +Version: 8.0.27 Release: 1 License: GPL Group: Development/System @@ -31,6 +31,10 @@ rm -rf ${RPM_BUILD_ROOT} %{_prefix}/lib/rpm/redhat %changelog +* Tue Jul 15 2003 Elliot Lee 8.0.27-1 +- Fix broken configure macro find for config.guess/config.sub +- Put host/target/build back for now + * Mon Jul 7 2003 Jens Petersen - 8.0.26-1 - preserve the vendor field when VENDOR not set - put VENDOR in the final i386-libc line, not the tentative one From 4ccbbe76dcd137e924faa6b4b5668f29720e37fc Mon Sep 17 00:00:00 2001 From: Elliot Lee Date: Tue, 15 Jul 2003 13:44:02 +0000 Subject: [PATCH 073/213] 8.0.27-1 --- Makefile | 2 +- macros | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 2608fc2..4708475 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ CVSTAG = REDHAT_RPM_CONFIG_$(subst .,_,$(VERSION)) all: tag-archive: - @cvs -Q tag -F $(CVSTAG) + cvs -Q tag -F $(CVSTAG) create-archive: @rm -rf /tmp/$(NAME) diff --git a/macros b/macros index 5168d9c..3f422cc 100644 --- a/macros +++ b/macros @@ -35,7 +35,7 @@ done ; \ ./configure --host=%{_host} --build=%{_build} \\\ --target=%{_target_platform} \\\ - --program_prefix=%{?_program_prefix} \\\ + --program-prefix=%{?_program_prefix} \\\ --prefix=%{_prefix} \\\ --exec-prefix=%{_exec_prefix} \\\ --bindir=%{_bindir} \\\ From ff150bb9f8902c9b3b418a9c49c59eb9493ad0c0 Mon Sep 17 00:00:00 2001 From: Elliot Lee Date: Wed, 17 Sep 2003 12:36:32 +0000 Subject: [PATCH 074/213] 8.0.28 --- brp-compress | 2 +- redhat-rpm-config.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/brp-compress b/brp-compress index 897a765..28051d9 100755 --- a/brp-compress +++ b/brp-compress @@ -8,7 +8,7 @@ fi cd $RPM_BUILD_ROOT # Compress man pages -COMPRESS="gzip -9" +COMPRESS="gzip -9 -n" COMPRESS_EXT=.gz for d in ./usr/man/man* ./usr/man/*/man* ./usr/info \ diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index 04ff257..47f9147 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -1,6 +1,6 @@ Summary: Red Hat specific rpm configuration files. Name: redhat-rpm-config -Version: 8.0.27 +Version: 8.0.28 Release: 1 License: GPL Group: Development/System @@ -31,6 +31,9 @@ rm -rf ${RPM_BUILD_ROOT} %{_prefix}/lib/rpm/redhat %changelog +* Wed Sep 17 2003 Elliot Lee 8.0.28-1 +- Change brp-compress to pass -n flag to gzip (per msw's request) + * Tue Jul 15 2003 Elliot Lee 8.0.27-1 - Fix broken configure macro find for config.guess/config.sub - Put host/target/build back for now From 421fb7784f226ae86c53a19970dae5e8133506e5 Mon Sep 17 00:00:00 2001 From: Elliot Lee Date: Wed, 17 Sep 2003 12:41:38 +0000 Subject: [PATCH 075/213] 8.0.28-1.1 --- redhat-rpm-config.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index 47f9147..f07a50d 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -1,7 +1,7 @@ Summary: Red Hat specific rpm configuration files. Name: redhat-rpm-config Version: 8.0.28 -Release: 1 +Release: 1.1 License: GPL Group: Development/System Source: redhat-rpm-config-%{version}.tar.gz From ecdfe2c6d31c7aefdd9f110d601e04af2e90f8f8 Mon Sep 17 00:00:00 2001 From: Elliot Lee Date: Mon, 3 Nov 2003 20:35:50 +0000 Subject: [PATCH 076/213] fix 108049 --- macros | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/macros b/macros index 3f422cc..b515f1e 100644 --- a/macros +++ b/macros @@ -51,7 +51,7 @@ --infodir=%{_infodir} %makeinstall \ - make \\\ + %{__make} \\\ prefix=%{?buildroot:%{buildroot}}%{_prefix} \\\ exec_prefix=%{?buildroot:%{buildroot}}%{_exec_prefix} \\\ bindir=%{?buildroot:%{buildroot}}%{_bindir} \\\ From 2eb59b7156aea3058bdcbce7bf334cf1017dad43 Mon Sep 17 00:00:00 2001 From: Elliot Lee Date: Mon, 1 Mar 2004 17:29:43 +0000 Subject: [PATCH 077/213] sync --- macros | 2 +- rpmrc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/macros b/macros index b515f1e..0a7cc1c 100644 --- a/macros +++ b/macros @@ -33,7 +33,7 @@ for i in $(find . -name config.guess -o -name config.sub) ; do \ [ -f /usr/lib/rpm/redhat/$(basename $i) ] && %{__rm} -f $i && %{__cp} -fv /usr/lib/rpm/redhat/$(basename $i) $i ; \ done ; \ - ./configure --host=%{_host} --build=%{_build} \\\ + ./configure --build=%{_build} --host=%{_host} \\\ --target=%{_target_platform} \\\ --program-prefix=%{?_program_prefix} \\\ --prefix=%{_prefix} \\\ diff --git a/rpmrc b/rpmrc index c5d9e33..3c46746 100644 --- a/rpmrc +++ b/rpmrc @@ -50,4 +50,4 @@ optflags: hades %{__global_cflags} optflags: s390 %{__global_cflags} optflags: s390x %{__global_cflags} -macrofiles: /usr/lib/rpm/macros:/usr/lib/rpm/%{_target}/macros:/usr/lib/rpm/redhat/macros:/etc/rpm/macros.specspo:/etc/rpm/macros.cdb:/etc/rpm/macros.prelink:/etc/rpm/macros.solve:/etc/rpm/macros.up2date:/etc/rpm/macros:/etc/rpm/%{_target}/macros:~/.rpmmacros +macrofiles: /usr/lib/rpm/macros:/usr/lib/rpm/%{_target}/macros:/usr/lib/rpm/redhat/macros:/etc/rpm/macros.specspo:/etc/rpm/macros.cdb:/etc/rpm/macros.prelink:/etc/rpm/macros.solve:/etc/rpm/macros.up2date:/etc/rpm/macros.jpackage:/etc/rpm/macros:/etc/rpm/%{_target}/macros:~/.rpmmacros From 92708fa5156c9ba4a084ad5ef709872ac78c00d9 Mon Sep 17 00:00:00 2001 From: Elliot Lee Date: Fri, 23 Apr 2004 14:23:32 +0000 Subject: [PATCH 078/213] #117217 --- rpmrc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rpmrc b/rpmrc index 3c46746..51eb978 100644 --- a/rpmrc +++ b/rpmrc @@ -50,4 +50,5 @@ optflags: hades %{__global_cflags} optflags: s390 %{__global_cflags} optflags: s390x %{__global_cflags} -macrofiles: /usr/lib/rpm/macros:/usr/lib/rpm/%{_target}/macros:/usr/lib/rpm/redhat/macros:/etc/rpm/macros.specspo:/etc/rpm/macros.cdb:/etc/rpm/macros.prelink:/etc/rpm/macros.solve:/etc/rpm/macros.up2date:/etc/rpm/macros.jpackage:/etc/rpm/macros:/etc/rpm/%{_target}/macros:~/.rpmmacros +macrofiles: +/usr/lib/rpm/macros:/usr/lib/rpm/%{_target}/macros:/usr/lib/rpm/redhat/macros:/etc/rpm/macros.*:/etc/rpm/macros:/etc/rpm/%{_target}/macros:~/.rpmmacros From 3e612b63b980f85179a05951af3693267ba974c3 Mon Sep 17 00:00:00 2001 From: Elliot Lee Date: Fri, 25 Jun 2004 16:01:38 +0000 Subject: [PATCH 079/213] sync --- rpmrc | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/rpmrc b/rpmrc index 51eb978..d77fc3f 100644 --- a/rpmrc +++ b/rpmrc @@ -1,12 +1,12 @@ include: /usr/lib/rpm/rpmrc -optflags: i386 %{__global_cflags} -march=i386 -mcpu=i686 -optflags: i486 %{__global_cflags} -march=i486 -optflags: i586 %{__global_cflags} -march=i586 -optflags: i686 %{__global_cflags} -march=i686 -optflags: athlon %{__global_cflags} -march=athlon +optflags: i386 %{__global_cflags} -m32 -march=i386 -mtune=pentium4 +optflags: i486 %{__global_cflags} -m32 -march=i486 +optflags: i586 %{__global_cflags} -m32 -march=i586 +optflags: i686 %{__global_cflags} -m32 -march=i686 -mtune=pentium4 +optflags: athlon %{__global_cflags} -m32 -march=athlon optflags: ia64 %{__global_cflags} -optflags: x86_64 %{__global_cflags} +optflags: x86_64 %{__global_cflags} -m64 optflags: alpha %{__global_cflags} -mieee optflags: alphaev5 %{__global_cflags} -mieee -mcpu=ev5 @@ -15,16 +15,16 @@ optflags: alphapca56 %{__global_cflags} -mieee -mcpu=pca56 optflags: alphaev6 %{__global_cflags} -mieee -mcpu=ev6 optflags: alphaev67 %{__global_cflags} -mieee -mcpu=ev67 -optflags: sparc %{__global_cflags} -m32 -mtune=ultrasparc +optflags: sparc %{__global_cflags} -m32 -mcpu=v7 -mtune=ultrasparc optflags: sparcv9 %{__global_cflags} -m32 -mcpu=ultrasparc optflags: sparc64 %{__global_cflags} -m64 -mcpu=ultrasparc optflags: m68k %{__global_cflags} -optflags: ppc %{__global_cflags} -fsigned-char -optflags: ppciseries %{__global_cflags} -fsigned-char -optflags: ppcpseries %{__global_cflags} -fsigned-char -optflags: ppc64 %{__global_cflags} -fsigned-char -mminimal-toc +optflags: ppc %{__global_cflags} -m32 -fsigned-char +optflags: ppciseries %{__global_cflags} -m32 -fsigned-char +optflags: ppcpseries %{__global_cflags} -m32 -fsigned-char +optflags: ppc64 %{__global_cflags} -m64 -fsigned-char -mminimal-toc optflags: parisc %{__global_cflags} -mpa-risc-1-0 optflags: hppa1.0 %{__global_cflags} -mpa-risc-1-0 @@ -47,8 +47,8 @@ optflags: atariclone %{__global_cflags} optflags: milan %{__global_cflags} optflags: hades %{__global_cflags} -optflags: s390 %{__global_cflags} -optflags: s390x %{__global_cflags} +optflags: s390 %{__global_cflags} -m31 +optflags: s390x %{__global_cflags} -m64 macrofiles: /usr/lib/rpm/macros:/usr/lib/rpm/%{_target}/macros:/usr/lib/rpm/redhat/macros:/etc/rpm/macros.*:/etc/rpm/macros:/etc/rpm/%{_target}/macros:~/.rpmmacros From 2c52d52eec5577c9ec1aaf8f372067120d8a96c5 Mon Sep 17 00:00:00 2001 From: Elliot Lee Date: Fri, 25 Jun 2004 16:02:37 +0000 Subject: [PATCH 080/213] 8.0.29 --- redhat-rpm-config.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index f07a50d..6c5cf5a 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -1,7 +1,7 @@ Summary: Red Hat specific rpm configuration files. Name: redhat-rpm-config -Version: 8.0.28 -Release: 1.1 +Version: 8.0.29 +Release: 1 License: GPL Group: Development/System Source: redhat-rpm-config-%{version}.tar.gz @@ -31,6 +31,9 @@ rm -rf ${RPM_BUILD_ROOT} %{_prefix}/lib/rpm/redhat %changelog +* Fri Jun 25 2004 Elliot Lee 8.0.29-1 +- rpmrc patch from jakub to change optflags. + * Wed Sep 17 2003 Elliot Lee 8.0.28-1 - Change brp-compress to pass -n flag to gzip (per msw's request) From fbb9bd1577195638ec67be49ec986c8d67b22dcd Mon Sep 17 00:00:00 2001 From: Elliot Lee Date: Fri, 25 Jun 2004 16:15:56 +0000 Subject: [PATCH 081/213] oops --- rpmrc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/rpmrc b/rpmrc index d77fc3f..9028bc2 100644 --- a/rpmrc +++ b/rpmrc @@ -50,5 +50,4 @@ optflags: hades %{__global_cflags} optflags: s390 %{__global_cflags} -m31 optflags: s390x %{__global_cflags} -m64 -macrofiles: -/usr/lib/rpm/macros:/usr/lib/rpm/%{_target}/macros:/usr/lib/rpm/redhat/macros:/etc/rpm/macros.*:/etc/rpm/macros:/etc/rpm/%{_target}/macros:~/.rpmmacros +macrofiles: /usr/lib/rpm/macros:/usr/lib/rpm/%{_target}/macros:/usr/lib/rpm/redhat/macros:/etc/rpm/macros.*:/etc/rpm/macros:/etc/rpm/%{_target}/macros:~/.rpmmacros From c9593fd884a918e831ac434479be88a5f7bed610 Mon Sep 17 00:00:00 2001 From: Elliot Lee Date: Fri, 25 Jun 2004 16:16:14 +0000 Subject: [PATCH 082/213] fix typo --- redhat-rpm-config.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index 6c5cf5a..45567fa 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -1,6 +1,6 @@ Summary: Red Hat specific rpm configuration files. Name: redhat-rpm-config -Version: 8.0.29 +Version: 8.0.30 Release: 1 License: GPL Group: Development/System From 0f91dc03fc4d0ce3a5b5b672d25e40eb68787515 Mon Sep 17 00:00:00 2001 From: Elliot Lee Date: Mon, 28 Jun 2004 14:07:05 +0000 Subject: [PATCH 083/213] add optflags for PPC 8260/8520 --- rpmrc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rpmrc b/rpmrc index 9028bc2..942c66a 100644 --- a/rpmrc +++ b/rpmrc @@ -25,6 +25,8 @@ optflags: ppc %{__global_cflags} -m32 -fsigned-char optflags: ppciseries %{__global_cflags} -m32 -fsigned-char optflags: ppcpseries %{__global_cflags} -m32 -fsigned-char optflags: ppc64 %{__global_cflags} -m64 -fsigned-char -mminimal-toc +optflags: ppc8260 %{__global_cflags} -m32 -fsigned-char +optflags: ppc8560 %{__global_cflags} -m32 -fsigned-char optflags: parisc %{__global_cflags} -mpa-risc-1-0 optflags: hppa1.0 %{__global_cflags} -mpa-risc-1-0 From 4b07b8dbc67bd2cfa73d5d5ca67e04398bf0cd69 Mon Sep 17 00:00:00 2001 From: Elliot Lee Date: Mon, 28 Jun 2004 19:48:43 +0000 Subject: [PATCH 084/213] 8.0.31 --- redhat-rpm-config.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index 45567fa..c1d1b22 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -1,6 +1,6 @@ Summary: Red Hat specific rpm configuration files. Name: redhat-rpm-config -Version: 8.0.30 +Version: 8.0.31 Release: 1 License: GPL Group: Development/System @@ -31,6 +31,9 @@ rm -rf ${RPM_BUILD_ROOT} %{_prefix}/lib/rpm/redhat %changelog +* Mon Jun 28 2004 Elliot Lee 8.0.31-1 +- Add ppc8[25]60 to rpmrc optflags + * Fri Jun 25 2004 Elliot Lee 8.0.29-1 - rpmrc patch from jakub to change optflags. From 7a4e10bb6560b90d44ae0a7ee43f419140a5aae9 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Fri, 1 Oct 2004 18:54:27 +0000 Subject: [PATCH 085/213] don't filter symbol versioning --- find-requires | 2 +- redhat-rpm-config.spec | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/find-requires b/find-requires index 0d8d868..d22f10c 100755 --- a/find-requires +++ b/find-requires @@ -111,7 +111,7 @@ for f in $liblist $exelist ; do sub(/:/, "", $3); LIBNAME=$3; } - (START==2) && (LIBNAME!="") && ($4!="") && (($4~/^GLIBC_*/) || ($4~/^GCC_*/)) { + (START==2) && (LIBNAME!="") && ($4!="") { print LIBNAME "(" $4 ")'$lib64'"; } ' diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index c1d1b22..461c242 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -1,6 +1,6 @@ Summary: Red Hat specific rpm configuration files. Name: redhat-rpm-config -Version: 8.0.31 +Version: 8.0.32 Release: 1 License: GPL Group: Development/System @@ -31,6 +31,10 @@ rm -rf ${RPM_BUILD_ROOT} %{_prefix}/lib/rpm/redhat %changelog +* Fri Oct 1 2004 Bill Nottingham 8.0.32-1 +- allow all symbol versioning in find_requires - matches RPM internal + behavior + * Mon Jun 28 2004 Elliot Lee 8.0.31-1 - Add ppc8[25]60 to rpmrc optflags From 84b567815c745a5f34e3bc3ecc917d7cd40d8c75 Mon Sep 17 00:00:00 2001 From: Adrian Havill Date: Fri, 15 Oct 2004 21:02:36 +0000 Subject: [PATCH 086/213] add "-f" (--force) to gunzip and bunzip2 for corner cases so that rpmbuild doesn't interactively ask to overwrite when it doesn't need to --- brp-compress | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/brp-compress b/brp-compress index 28051d9..3f76fe5 100755 --- a/brp-compress +++ b/brp-compress @@ -23,9 +23,9 @@ do [ "`basename $f`" = "dir" ] && continue case "$f" in - *.Z) gunzip $f; b=`echo $f | sed -e 's/\.Z$//'`;; - *.gz) gunzip $f; b=`echo $f | sed -e 's/\.gz$//'`;; - *.bz2) bunzip2 $f; b=`echo $f | sed -e 's/\.bz2$//'`;; + *.Z) gunzip -f $f; b=`echo $f | sed -e 's/\.Z$//'`;; + *.gz) gunzip -f $f; b=`echo $f | sed -e 's/\.gz$//'`;; + *.bz2) bunzip2 -f $f; b=`echo $f | sed -e 's/\.bz2$//'`;; *) b=$f;; esac From d10e27e7b757991e6a1cbc62e0b1a772fb7f9ac8 Mon Sep 17 00:00:00 2001 From: Elliot Lee Date: Mon, 15 Nov 2004 15:23:30 +0000 Subject: [PATCH 087/213] add _FORTIFY_SOURCE --- macros | 2 +- redhat-rpm-config.spec | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/macros b/macros index 0a7cc1c..7cbe282 100644 --- a/macros +++ b/macros @@ -151,4 +151,4 @@ unset DISPLAY\ %__find_provides /usr/lib/rpm/redhat/find-provides %__find_requires /usr/lib/rpm/redhat/find-requires -%__global_cflags -O2 -g -pipe +%__global_cflags -O2 -g -pipe -D_FORTIFY_SOURCE=2 diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index 461c242..d47cf84 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -31,6 +31,9 @@ rm -rf ${RPM_BUILD_ROOT} %{_prefix}/lib/rpm/redhat %changelog +* Mon Nov 15 2004 Elliot Lee 8.0.33-1 +- Add -D_FORTIFY_SOURCE=2 to global cflags (as per Jakub & Arjan's request) + * Fri Oct 1 2004 Bill Nottingham 8.0.32-1 - allow all symbol versioning in find_requires - matches RPM internal behavior From 6d1ad8ea36efc07d71def0959ad97d2d73491a53 Mon Sep 17 00:00:00 2001 From: Elliot Lee Date: Thu, 2 Dec 2004 20:54:26 +0000 Subject: [PATCH 088/213] sparcv8 support (#117302) --- config.sub | 6 +++--- rpmrc | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/config.sub b/config.sub index 7cee3d6..6b2ff9f 100644 --- a/config.sub +++ b/config.sub @@ -260,7 +260,7 @@ case $basic_machine in | s390 | s390x \ | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ - | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \ + | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \ | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ @@ -334,7 +334,7 @@ case $basic_machine in | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ - | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tron-* \ @@ -1051,7 +1051,7 @@ case $basic_machine in sh64) basic_machine=sh64-unknown ;; - sparc | sparcv9 | sparcv9b) + sparc | sparcv8 | sparcv9 | sparcv9b) basic_machine=sparc-sun ;; cydra) diff --git a/rpmrc b/rpmrc index 942c66a..a36e4c8 100644 --- a/rpmrc +++ b/rpmrc @@ -16,6 +16,7 @@ optflags: alphaev6 %{__global_cflags} -mieee -mcpu=ev6 optflags: alphaev67 %{__global_cflags} -mieee -mcpu=ev67 optflags: sparc %{__global_cflags} -m32 -mcpu=v7 -mtune=ultrasparc +optflags: sparcv8 %{__global_cflags} -m32 -mcpu=ultrasparc -mv8 optflags: sparcv9 %{__global_cflags} -m32 -mcpu=ultrasparc optflags: sparc64 %{__global_cflags} -m64 -mcpu=ultrasparc From f8bcd4e337ec039040887d608c826595fbe56ca0 Mon Sep 17 00:00:00 2001 From: Elliot Lee Date: Fri, 3 Dec 2004 18:52:37 +0000 Subject: [PATCH 089/213] sync --- redhat-rpm-config.spec | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index d47cf84..a0a1165 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -10,6 +10,11 @@ BuildArch: noarch #Requires: mktemp BuildRoot: %{_tmppath}/%{name}-root +# rpmrc passes -mtune which first appeared in gcc 3.4 +%ifarch i386 i686 sparc +Conflicts: gcc < 3.4 +%endif + %description Red Hat specific rpm configuration files. From 89e3065f19c3763e3cb768759ce106292c445ec6 Mon Sep 17 00:00:00 2001 From: Elliot Lee Date: Fri, 3 Dec 2004 19:28:33 +0000 Subject: [PATCH 090/213] Add ppc64[ip]series optflags --- rpmrc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rpmrc b/rpmrc index a36e4c8..6bc12bd 100644 --- a/rpmrc +++ b/rpmrc @@ -26,6 +26,8 @@ optflags: ppc %{__global_cflags} -m32 -fsigned-char optflags: ppciseries %{__global_cflags} -m32 -fsigned-char optflags: ppcpseries %{__global_cflags} -m32 -fsigned-char optflags: ppc64 %{__global_cflags} -m64 -fsigned-char -mminimal-toc +optflags: ppc64iseries %{__global_cflags} -m64 -fsigned-char -mminimal-toc +optflags: ppc64pseries %{__global_cflags} -m64 -fsigned-char -mminimal-toc optflags: ppc8260 %{__global_cflags} -m32 -fsigned-char optflags: ppc8560 %{__global_cflags} -m32 -fsigned-char From 1518ff2d14377c05ecf7cf9428e42964516883b4 Mon Sep 17 00:00:00 2001 From: Elliot Lee Date: Wed, 9 Feb 2005 15:09:11 +0000 Subject: [PATCH 091/213] Fix java builds --- macros | 2 +- redhat-rpm-config.spec | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/macros b/macros index 7cbe282..18c61b5 100644 --- a/macros +++ b/macros @@ -151,4 +151,4 @@ unset DISPLAY\ %__find_provides /usr/lib/rpm/redhat/find-provides %__find_requires /usr/lib/rpm/redhat/find-requires -%__global_cflags -O2 -g -pipe -D_FORTIFY_SOURCE=2 +%__global_cflags -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index a0a1165..e7f3f95 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -1,6 +1,6 @@ Summary: Red Hat specific rpm configuration files. Name: redhat-rpm-config -Version: 8.0.32 +Version: 8.0.33 Release: 1 License: GPL Group: Development/System @@ -9,7 +9,6 @@ BuildArch: noarch #Requires: rpmbuild(VendorConfig) <= 4.1 #Requires: mktemp BuildRoot: %{_tmppath}/%{name}-root - # rpmrc passes -mtune which first appeared in gcc 3.4 %ifarch i386 i686 sparc Conflicts: gcc < 3.4 @@ -36,7 +35,8 @@ rm -rf ${RPM_BUILD_ROOT} %{_prefix}/lib/rpm/redhat %changelog -* Mon Nov 15 2004 Elliot Lee 8.0.33-1 +* Wed Feb 9 2005 Elliot Lee 8.0.33-1 +- Change -D to -Wp,-D to make java happy - Add -D_FORTIFY_SOURCE=2 to global cflags (as per Jakub & Arjan's request) * Fri Oct 1 2004 Bill Nottingham 8.0.32-1 From f41aa8c35fb2fb638772c036a24ad56089baef5f Mon Sep 17 00:00:00 2001 From: Elliot Lee Date: Tue, 22 Mar 2005 03:30:56 +0000 Subject: [PATCH 092/213] #147961 --- macros | 3 +++ 1 file changed, 3 insertions(+) diff --git a/macros b/macros index 18c61b5..c935b6a 100644 --- a/macros +++ b/macros @@ -152,3 +152,6 @@ unset DISPLAY\ %__find_requires /usr/lib/rpm/redhat/find-requires %__global_cflags -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 + +# Disable lookups +%_hkp_keyserver %{nil} From 6eb38ebaff708ffa7e40a9010dc02592ce9df7dd Mon Sep 17 00:00:00 2001 From: Elliot Lee Date: Wed, 23 Mar 2005 19:52:10 +0000 Subject: [PATCH 093/213] new version --- redhat-rpm-config.spec | 6 +++++- rpmrc | 12 ++++++------ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index e7f3f95..d6b63af 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -1,6 +1,6 @@ Summary: Red Hat specific rpm configuration files. Name: redhat-rpm-config -Version: 8.0.33 +Version: 8.0.34 Release: 1 License: GPL Group: Development/System @@ -35,6 +35,10 @@ rm -rf ${RPM_BUILD_ROOT} %{_prefix}/lib/rpm/redhat %changelog +* Wed Mar 23 2005 Elliot Lee 8.0.34-1 +- Bug fixes +- Cflags change by drepper + * Wed Feb 9 2005 Elliot Lee 8.0.33-1 - Change -D to -Wp,-D to make java happy - Add -D_FORTIFY_SOURCE=2 to global cflags (as per Jakub & Arjan's request) diff --git a/rpmrc b/rpmrc index 6bc12bd..74efe20 100644 --- a/rpmrc +++ b/rpmrc @@ -1,12 +1,12 @@ include: /usr/lib/rpm/rpmrc -optflags: i386 %{__global_cflags} -m32 -march=i386 -mtune=pentium4 -optflags: i486 %{__global_cflags} -m32 -march=i486 -optflags: i586 %{__global_cflags} -m32 -march=i586 -optflags: i686 %{__global_cflags} -m32 -march=i686 -mtune=pentium4 -optflags: athlon %{__global_cflags} -m32 -march=athlon +optflags: i386 %{__global_cflags} -m32 -march=i386 -mtune=pentium4 -fexceptions -fasynchronous-unwind-tables +optflags: i486 %{__global_cflags} -m32 -march=i486 -fexceptions -fasynchronous-unwind-tables +optflags: i586 %{__global_cflags} -m32 -march=i586 -fexceptions -fasynchronous-unwind-tables +optflags: i686 %{__global_cflags} -m32 -march=i686 -mtune=pentium4 -fexceptions -fasynchronous-unwind-tables +optflags: athlon %{__global_cflags} -m32 -march=athlon -fexceptions -fasynchronous-unwind-tables optflags: ia64 %{__global_cflags} -optflags: x86_64 %{__global_cflags} -m64 +optflags: x86_64 %{__global_cflags} -m64 -march=nocona optflags: alpha %{__global_cflags} -mieee optflags: alphaev5 %{__global_cflags} -mieee -mcpu=ev5 From ded130c1dd5a1c1aa16f3c18fb41211184a993a4 Mon Sep 17 00:00:00 2001 From: Elliot Lee Date: Wed, 23 Mar 2005 20:05:40 +0000 Subject: [PATCH 094/213] new version --- macros | 2 +- rpmrc | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/macros b/macros index c935b6a..9aa8269 100644 --- a/macros +++ b/macros @@ -151,7 +151,7 @@ unset DISPLAY\ %__find_provides /usr/lib/rpm/redhat/find-provides %__find_requires /usr/lib/rpm/redhat/find-requires -%__global_cflags -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 +%__global_cflags -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions # Disable lookups %_hkp_keyserver %{nil} diff --git a/rpmrc b/rpmrc index 74efe20..7aa67e1 100644 --- a/rpmrc +++ b/rpmrc @@ -1,12 +1,12 @@ include: /usr/lib/rpm/rpmrc -optflags: i386 %{__global_cflags} -m32 -march=i386 -mtune=pentium4 -fexceptions -fasynchronous-unwind-tables -optflags: i486 %{__global_cflags} -m32 -march=i486 -fexceptions -fasynchronous-unwind-tables -optflags: i586 %{__global_cflags} -m32 -march=i586 -fexceptions -fasynchronous-unwind-tables -optflags: i686 %{__global_cflags} -m32 -march=i686 -mtune=pentium4 -fexceptions -fasynchronous-unwind-tables -optflags: athlon %{__global_cflags} -m32 -march=athlon -fexceptions -fasynchronous-unwind-tables +optflags: i386 %{__global_cflags} -m32 -march=i386 -mtune=pentium4 -fasynchronous-unwind-tables +optflags: i486 %{__global_cflags} -m32 -march=i486 -fasynchronous-unwind-tables +optflags: i586 %{__global_cflags} -m32 -march=i586 -fasynchronous-unwind-tables +optflags: i686 %{__global_cflags} -m32 -march=i686 -mtune=pentium4 -fasynchronous-unwind-tables +optflags: athlon %{__global_cflags} -m32 -march=athlon -fasynchronous-unwind-tables optflags: ia64 %{__global_cflags} -optflags: x86_64 %{__global_cflags} -m64 -march=nocona +optflags: x86_64 %{__global_cflags} -m64 -mtune=nocona optflags: alpha %{__global_cflags} -mieee optflags: alphaev5 %{__global_cflags} -mieee -mcpu=ev5 From 259bb7270c10dfc42922139c16555767d129c477 Mon Sep 17 00:00:00 2001 From: Elliot Lee Date: Thu, 24 Mar 2005 20:10:06 +0000 Subject: [PATCH 095/213] add dist.sh --- dist.sh | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100755 dist.sh diff --git a/dist.sh b/dist.sh new file mode 100755 index 0000000..9cbeb8d --- /dev/null +++ b/dist.sh @@ -0,0 +1,66 @@ +#!/bin/bash +# dist.sh +# Author: Tom "spot" Callaway +# License: GPL +# This is a script to output the value for the %{dist} +# tag. The dist tag takes the following format: .$type$num +# Where $type is one of: el, fc, rh +# (for RHEL, Fedora Core, and RHL, respectively) +# And $num is the version number of the distribution. +# NOTE: We can't detect Rawhide or Fedora Test builds properly. +# If we successfully detect the version number, we output the +# dist tag. Otherwise, we exit with no output. + +RELEASEFILE=/etc/redhat-release + +function check_num { + MAINVER=`cut -d "(" -f 1 < $RELEASEFILE | \ + sed -e "s/[^0-9.]//g" -e "s/$//g" | cut -d "." -f 1` + + echo $MAINVER | grep -q '[0-9]' && echo $MAINVER +} + +function check_rhl { + grep -q "Red Hat Linux" $RELEASEFILE && ! grep -q "Advanced" $RELEASEFILE && echo $DISTNUM +} + +function check_rhel { + egrep -q "(Enterprise|Advanced)" $RELEASEFILE && echo $DISTNUM +} + +function check_fedora { + grep -q Fedora $RELEASEFILE && echo $DISTNUM +} + +DISTNUM=`check_num` +DISTFC=`check_fedora` +DISTRHL=`check_rhl` +DISTRHEL=`check_rhel` +if [ -n "$DISTNUM" ]; then + if [ -n "$DISTFC" ]; then + DISTTYPE=fc + elif [ -n "$DISTRHEL" ]; then + DISTTYPE=el + elif [ -n "$DISTRHL" ]; then + DISTTYPE=rhl + fi +fi +[ -n "$DISTTYPE" -a -n "$DISTNUM" ] && DISTTAG=".${DISTTYPE}${DISTNUM}" + +case "$1" in + --el) echo -n "$DISTRHEL" ;; + --fc) echo -n "$DISTFEDORA" ;; + --rhl) echo -n "$DISTRHL" ;; + --distnum) echo -n "$DISTNUM" ;; + --disttype) echo -n "$DISTTYPE" ;; + --help) + printf "Usage: $0 [OPTIONS]\n" + printf " Default mode is --dist. Possible options:\n" + printf " --el\t\tfor RHEL version (if RHEL)\n" + printf " --fc\t\tfor Fedora version (if Fedora)\n" + printf " --rhl\t\tfor RHL version (if RHL)\n" + printf " --dist\t\tfor distribution tag\n" + printf " --distnum\tfor distribution number (major)\n" + printf " --disttype\tfor distribution type\n" ;; + *) echo -n "$DISTTAG" ;; +esac From 1a959d38c8ca8bea6e932c068a49107f15763102 Mon Sep 17 00:00:00 2001 From: Elliot Lee Date: Thu, 7 Apr 2005 03:10:39 +0000 Subject: [PATCH 096/213] fix #129025 --- brp-redhat | 2 ++ redhat-rpm-config.spec | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/brp-redhat b/brp-redhat index bdd5048..34c22ab 100755 --- a/brp-redhat +++ b/brp-redhat @@ -11,3 +11,5 @@ # Strip even more sections (Red Hat uses GNU binutils). /usr/lib/rpm/redhat/brp-strip-comment-note + +/usr/lib/rpm/brp-python-bytecompile diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index d6b63af..6d44514 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -1,6 +1,6 @@ Summary: Red Hat specific rpm configuration files. Name: redhat-rpm-config -Version: 8.0.34 +Version: 8.0.35 Release: 1 License: GPL Group: Development/System @@ -35,6 +35,9 @@ rm -rf ${RPM_BUILD_ROOT} %{_prefix}/lib/rpm/redhat %changelog +* Wed Apr 6 2005 Elliot Lee - 8.0.35-1 +- Fix #129025 (enable python byte compilation) + * Wed Mar 23 2005 Elliot Lee 8.0.34-1 - Bug fixes - Cflags change by drepper From 5fc6cf03a1585a5829f9ad90b991ae63443c4d0f Mon Sep 17 00:00:00 2001 From: Elliot Lee Date: Fri, 10 Jun 2005 17:19:17 +0000 Subject: [PATCH 097/213] fix 159117 --- brp-strip | 2 +- brp-strip-comment-note | 2 +- brp-strip-shared | 2 +- brp-strip-static-archive | 2 +- find-provides | 5 +++++ find-provides.libtool | 10 ++++++++++ find-provides.pkgconfig | 22 ++++++++++++++++++++++ find-requires.libtool | 15 +++++++++++++++ find-requires.pkgconfig | 11 +++++++++++ 9 files changed, 67 insertions(+), 4 deletions(-) create mode 100755 find-provides.libtool create mode 100755 find-provides.pkgconfig create mode 100755 find-requires.libtool create mode 100755 find-requires.pkgconfig diff --git a/brp-strip b/brp-strip index 3a4f923..4882f5f 100755 --- a/brp-strip +++ b/brp-strip @@ -10,5 +10,5 @@ for f in `find $RPM_BUILD_ROOT -type f \( -perm -0100 -or -perm -0010 -or -perm grep -v "^${RPM_BUILD_ROOT}/\?usr/lib/debug" | \ grep -v ' shared object,' | \ sed -n -e 's/^\(.*\):[ ]*ELF.*, not stripped/\1/p'`; do - $STRIP -g $f || : + $STRIP -g "$f" || : done diff --git a/brp-strip-comment-note b/brp-strip-comment-note index db32226..0b63efe 100755 --- a/brp-strip-comment-note +++ b/brp-strip-comment-note @@ -19,5 +19,5 @@ for f in `find $RPM_BUILD_ROOT -type f \( -perm -0100 -or -perm -0010 -or -perm grep ALLOC >/dev/null; then note= fi - $STRIP -R .comment $note $f || : + $STRIP -R .comment $note "$f" || : done diff --git a/brp-strip-shared b/brp-strip-shared index 1e8300e..9b78d5e 100755 --- a/brp-strip-shared +++ b/brp-strip-shared @@ -16,5 +16,5 @@ for f in `find $RPM_BUILD_ROOT -type f -a -exec file {} \; | \ grep -v "^${RPM_BUILD_ROOT}/\?usr/lib/debug" | \ grep ' shared object,' | \ sed -n -e 's/^\(.*\):[ ]*ELF.*, not stripped/\1/p'`; do - $STRIP --strip-unneeded $f + $STRIP --strip-unneeded "$f" done diff --git a/brp-strip-static-archive b/brp-strip-static-archive index 98d5d65..786e7f3 100755 --- a/brp-strip-static-archive +++ b/brp-strip-static-archive @@ -12,5 +12,5 @@ for f in `find $RPM_BUILD_ROOT -type f -a -exec file {} \; | \ grep -v "^${RPM_BUILD_ROOT}/\?usr/lib/debug" | \ grep 'current ar archive' | \ sed -n -e 's/^\(.*\):[ ]*current ar archive/\1/p'`; do - $STRIP -g $f + $STRIP -g "$f" done diff --git a/find-provides b/find-provides index e955b15..6af54cd 100755 --- a/find-provides +++ b/find-provides @@ -60,4 +60,9 @@ done | sort -u [ -x /usr/lib/rpm/redhat/tcl.prov -a -n "$tcllist" ] && echo $tcllist | tr '[:blank:]' \\n | /usr/lib/rpm/redhat/tcl.prov | sort -u +# +# --- libtool +[ -x /usr/lib/rpm/redhat/find-provides.libtool ] && + echo $filelist | tr '[:blank:]' \\n | /usr/lib/rpm/redhat/find-provides.libtool | sort -u + exit 0 diff --git a/find-provides.libtool b/find-provides.libtool new file mode 100755 index 0000000..042ab29 --- /dev/null +++ b/find-provides.libtool @@ -0,0 +1,10 @@ +#!/bin/sh +while read possible ; do + case "$possible" in + *.la) + if grep -iq '^# Generated by ltmain.sh' "$possible" 2> /dev/null ; then + echo "libtool($possible)" + fi + ;; + esac +done diff --git a/find-provides.pkgconfig b/find-provides.pkgconfig new file mode 100755 index 0000000..389bef7 --- /dev/null +++ b/find-provides.pkgconfig @@ -0,0 +1,22 @@ +#!/bin/bash +pkgconfig=${1:-/usr/bin/pkg-config} +test -x $pkgconfig || exit 0 +while read filename ; do +case "${filename}" in +*.pc) + # Assume that this file doesn't contain useful information. + needs_pkgconfig=false + # Query the dependencies of the package. + $pkgconfig --print-provides "$filename" 2> /dev/null | while read n r v ; do + # We have a dependency. Make a note that we need the pkgconfig + # tool for this package. + echo "pkgconfig($n)" "$r" "$v" + needs_pkgconfig=true + done + # The dependency on the pkgconfig package itself. + if $needs_pkgconfig ; then + echo pkgconfig + fi + ;; +esac +done diff --git a/find-requires.libtool b/find-requires.libtool new file mode 100755 index 0000000..4d95ddb --- /dev/null +++ b/find-requires.libtool @@ -0,0 +1,15 @@ +#!/bin/sh +while read possible ; do + case "$possible" in + *.la) + for dep in `grep ^dependency_libs= "$possible" 2> /dev/null | \ + sed -r -e "s,^dependency_libs='(.*)',\1,g"` ; do + case "$dep" in + /*.la) + echo "libtool($dep)" + ;; + esac + done + ;; + esac +done diff --git a/find-requires.pkgconfig b/find-requires.pkgconfig new file mode 100755 index 0000000..ff4f8bd --- /dev/null +++ b/find-requires.pkgconfig @@ -0,0 +1,11 @@ +#!/bin/bash +pkgconfig=${1:-/usr/bin/pkg-config} +test -x $pkgconfig || exit 0 +while read filename ; do +case "${filename}" in +*.pc) + $pkgconfig --print-requires "$filename" 2> /dev/null | while read n r v ; do + echo "pkgconfig($n)" "$r" "$v" + done +esac +done From b8c7c4c827f4f5ddbdf735cba1e072a3ffa82989 Mon Sep 17 00:00:00 2001 From: Elliot Lee Date: Wed, 15 Jun 2005 22:18:12 +0000 Subject: [PATCH 098/213] Enable python, pkgconfig provides --- find-provides | 5 +++++ macros | 1 + 2 files changed, 6 insertions(+) diff --git a/find-provides b/find-provides index 6af54cd..f0a5624 100755 --- a/find-provides +++ b/find-provides @@ -65,4 +65,9 @@ done | sort -u [ -x /usr/lib/rpm/redhat/find-provides.libtool ] && echo $filelist | tr '[:blank:]' \\n | /usr/lib/rpm/redhat/find-provides.libtool | sort -u +# +# --- pkgconfig +[ -x /usr/lib/rpm/redhat/find-provides.pkgconfig ] && + echo $filelist | tr '[:blank:]' \\n | /usr/lib/rpm/redhat/find-provides.pkgconfig | sort -u + exit 0 diff --git a/macros b/macros index 9aa8269..a24c3cd 100644 --- a/macros +++ b/macros @@ -85,6 +85,7 @@ /usr/lib/rpm/redhat/brp-strip %{__strip} \ /usr/lib/rpm/redhat/brp-strip-static-archive %{__strip} \ /usr/lib/rpm/redhat/brp-strip-comment-note %{__strip} %{__objdump} \ + /usr/lib/rpm/redhat/brp-python-bytecompile \ %{nil} # /usr/lib/rpm/redhat/brp-implant-ident-static From f20fd095421a750491811388ce17517035448417 Mon Sep 17 00:00:00 2001 From: Elliot Lee Date: Thu, 16 Jun 2005 15:42:31 +0000 Subject: [PATCH 099/213] fix --- macros | 2 +- redhat-rpm-config.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/macros b/macros index a24c3cd..8dce373 100644 --- a/macros +++ b/macros @@ -85,7 +85,7 @@ /usr/lib/rpm/redhat/brp-strip %{__strip} \ /usr/lib/rpm/redhat/brp-strip-static-archive %{__strip} \ /usr/lib/rpm/redhat/brp-strip-comment-note %{__strip} %{__objdump} \ - /usr/lib/rpm/redhat/brp-python-bytecompile \ + /usr/lib/rpm/brp-python-bytecompile \ %{nil} # /usr/lib/rpm/redhat/brp-implant-ident-static diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index 6d44514..878f820 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -1,6 +1,6 @@ Summary: Red Hat specific rpm configuration files. Name: redhat-rpm-config -Version: 8.0.35 +Version: 8.0.36 Release: 1 License: GPL Group: Development/System @@ -35,6 +35,9 @@ rm -rf ${RPM_BUILD_ROOT} %{_prefix}/lib/rpm/redhat %changelog +* Thu Jun 16 2005 Elliot Lee - 8.0.36-1 +- Fix the fix + * Wed Apr 6 2005 Elliot Lee - 8.0.35-1 - Fix #129025 (enable python byte compilation) From 1986646f8544c9f84b8c3b07c151e581daf08a99 Mon Sep 17 00:00:00 2001 From: Elliot Lee Date: Mon, 1 Aug 2005 17:44:57 +0000 Subject: [PATCH 100/213] 8.0.37: On Fri, 29 Jul 2005, Ulrich Drepper wrote: > Please find attached the hopefully final changes for the compile flags. > It's a patch against redhat-rpm-config-8.0.36-1.src.rpm. The changes are: > > ~ enable stack protector with minimal size 4 (default is 8, too high > IMO). Vlad ran some tests on SPEC. SPEC is highly CPU intensive, > unlike 90%+ of the distribution. Even in those tests the performance > decrease was below 1%, probably even in the noise. Especially the > decrease of the minimum size to 4 made no measurable impact. > > ~ remove the -fsigned-char flag for ppc. glibc has not been compiled > with the flag anyway, so if anything changes, we eliminate some bugs. > The only theoretical issue would be if a library we ship uses CHAR_MAX > in an interface. I personally haven't seen this for good reasons. > The only interface I know is localeconv(3) in glibc and this interface > is now corrected. > > ~ minor fix for SPARC --- macros | 2 +- redhat-rpm-config.spec | 5 ++++- rpmrc | 18 +++++++++--------- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/macros b/macros index 8dce373..5069343 100644 --- a/macros +++ b/macros @@ -152,7 +152,7 @@ unset DISPLAY\ %__find_provides /usr/lib/rpm/redhat/find-provides %__find_requires /usr/lib/rpm/redhat/find-requires -%__global_cflags -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions +%__global_cflags -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 # Disable lookups %_hkp_keyserver %{nil} diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index 878f820..d7ae522 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -1,6 +1,6 @@ Summary: Red Hat specific rpm configuration files. Name: redhat-rpm-config -Version: 8.0.36 +Version: 8.0.37 Release: 1 License: GPL Group: Development/System @@ -35,6 +35,9 @@ rm -rf ${RPM_BUILD_ROOT} %{_prefix}/lib/rpm/redhat %changelog +* Mon Aug 01 2005 Elliot Lee - 8.0.37-1 +- Patch from Uli: enable stack protector, fix sparc & ppc cflags + * Thu Jun 16 2005 Elliot Lee - 8.0.36-1 - Fix the fix diff --git a/rpmrc b/rpmrc index 7aa67e1..da849c3 100644 --- a/rpmrc +++ b/rpmrc @@ -16,20 +16,20 @@ optflags: alphaev6 %{__global_cflags} -mieee -mcpu=ev6 optflags: alphaev67 %{__global_cflags} -mieee -mcpu=ev67 optflags: sparc %{__global_cflags} -m32 -mcpu=v7 -mtune=ultrasparc -optflags: sparcv8 %{__global_cflags} -m32 -mcpu=ultrasparc -mv8 +optflags: sparcv8 %{__global_cflags} -m32 -mcpu=v8 optflags: sparcv9 %{__global_cflags} -m32 -mcpu=ultrasparc optflags: sparc64 %{__global_cflags} -m64 -mcpu=ultrasparc optflags: m68k %{__global_cflags} -optflags: ppc %{__global_cflags} -m32 -fsigned-char -optflags: ppciseries %{__global_cflags} -m32 -fsigned-char -optflags: ppcpseries %{__global_cflags} -m32 -fsigned-char -optflags: ppc64 %{__global_cflags} -m64 -fsigned-char -mminimal-toc -optflags: ppc64iseries %{__global_cflags} -m64 -fsigned-char -mminimal-toc -optflags: ppc64pseries %{__global_cflags} -m64 -fsigned-char -mminimal-toc -optflags: ppc8260 %{__global_cflags} -m32 -fsigned-char -optflags: ppc8560 %{__global_cflags} -m32 -fsigned-char +optflags: ppc %{__global_cflags} -m32 +optflags: ppciseries %{__global_cflags} -m32 +optflags: ppcpseries %{__global_cflags} -m32 +optflags: ppc64 %{__global_cflags} -m64 -mminimal-toc +optflags: ppc64iseries %{__global_cflags} -m64 -mminimal-toc +optflags: ppc64pseries %{__global_cflags} -m64 -mminimal-toc +optflags: ppc8260 %{__global_cflags} -m32 +optflags: ppc8560 %{__global_cflags} -m32 optflags: parisc %{__global_cflags} -mpa-risc-1-0 optflags: hppa1.0 %{__global_cflags} -mpa-risc-1-0 From d5e4ed68cb77afc6bf93dba94b605046d8255ffa Mon Sep 17 00:00:00 2001 From: Elliot Lee Date: Mon, 1 Aug 2005 17:53:18 +0000 Subject: [PATCH 101/213] add wall back in --- macros | 2 +- redhat-rpm-config.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/macros b/macros index 5069343..cb18f2e 100644 --- a/macros +++ b/macros @@ -152,7 +152,7 @@ unset DISPLAY\ %__find_provides /usr/lib/rpm/redhat/find-provides %__find_requires /usr/lib/rpm/redhat/find-requires -%__global_cflags -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 +%__global_cflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 # Disable lookups %_hkp_keyserver %{nil} diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index d7ae522..346b779 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -1,6 +1,6 @@ Summary: Red Hat specific rpm configuration files. Name: redhat-rpm-config -Version: 8.0.37 +Version: 8.0.38 Release: 1 License: GPL Group: Development/System @@ -35,6 +35,9 @@ rm -rf ${RPM_BUILD_ROOT} %{_prefix}/lib/rpm/redhat %changelog +* Mon Aug 01 2005 Elliot Lee - 8.0.38-1 +- Add -Wall into cflags + * Mon Aug 01 2005 Elliot Lee - 8.0.37-1 - Patch from Uli: enable stack protector, fix sparc & ppc cflags From d3e0d601f6af5e38e23242d5b3ba66fbb7f5c82d Mon Sep 17 00:00:00 2001 From: Elliot Lee Date: Mon, 1 Aug 2005 17:54:09 +0000 Subject: [PATCH 102/213] add wall back in --- redhat-rpm-config.spec | 3 --- 1 file changed, 3 deletions(-) diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index 346b779..bc7288b 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -35,9 +35,6 @@ rm -rf ${RPM_BUILD_ROOT} %{_prefix}/lib/rpm/redhat %changelog -* Mon Aug 01 2005 Elliot Lee - 8.0.38-1 -- Add -Wall into cflags - * Mon Aug 01 2005 Elliot Lee - 8.0.37-1 - Patch from Uli: enable stack protector, fix sparc & ppc cflags From 12233c1d7bc20c6230e84a6142cfa0adf40601db Mon Sep 17 00:00:00 2001 From: Elliot Lee Date: Wed, 17 Aug 2005 00:27:33 +0000 Subject: [PATCH 103/213] fix #165416 --- macros | 2 +- redhat-rpm-config.spec | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/macros b/macros index cb18f2e..4cea385 100644 --- a/macros +++ b/macros @@ -82,7 +82,7 @@ %__os_install_post \ /usr/lib/rpm/redhat/brp-compress \ - /usr/lib/rpm/redhat/brp-strip %{__strip} \ + %{!?__debug_package:/usr/lib/rpm/redhat/brp-strip %{__strip}} \ /usr/lib/rpm/redhat/brp-strip-static-archive %{__strip} \ /usr/lib/rpm/redhat/brp-strip-comment-note %{__strip} %{__objdump} \ /usr/lib/rpm/brp-python-bytecompile \ diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index bc7288b..2aef6b1 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -1,6 +1,6 @@ Summary: Red Hat specific rpm configuration files. Name: redhat-rpm-config -Version: 8.0.38 +Version: 8.0.39 Release: 1 License: GPL Group: Development/System @@ -35,6 +35,12 @@ rm -rf ${RPM_BUILD_ROOT} %{_prefix}/lib/rpm/redhat %changelog +* Tue Aug 16 2005 Elliot Lee - 8.0.39-1 +- Fix #165416 + +* Mon Aug 01 2005 Elliot Lee - 8.0.38-1 +- Add -Wall into cflags + * Mon Aug 01 2005 Elliot Lee - 8.0.37-1 - Patch from Uli: enable stack protector, fix sparc & ppc cflags From c8ec9fb01f33746c8770ecfb31bd938e35490c74 Mon Sep 17 00:00:00 2001 From: Jeremy Katz Date: Fri, 3 Feb 2006 23:00:26 +0000 Subject: [PATCH 104/213] use -mtune=generic for x86 and x86_64 --- redhat-rpm-config.spec | 5 ++++- rpmrc | 6 +++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index 2aef6b1..0836b66 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -1,6 +1,6 @@ Summary: Red Hat specific rpm configuration files. Name: redhat-rpm-config -Version: 8.0.39 +Version: 8.0.40 Release: 1 License: GPL Group: Development/System @@ -35,6 +35,9 @@ rm -rf ${RPM_BUILD_ROOT} %{_prefix}/lib/rpm/redhat %changelog +* Fri Feb 3 2006 Jeremy Katz - 8.0.40-1 +- use -mtune=generic for x86 and x86_64 + * Tue Aug 16 2005 Elliot Lee - 8.0.39-1 - Fix #165416 diff --git a/rpmrc b/rpmrc index da849c3..dccaa7e 100644 --- a/rpmrc +++ b/rpmrc @@ -1,12 +1,12 @@ include: /usr/lib/rpm/rpmrc -optflags: i386 %{__global_cflags} -m32 -march=i386 -mtune=pentium4 -fasynchronous-unwind-tables +optflags: i386 %{__global_cflags} -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables optflags: i486 %{__global_cflags} -m32 -march=i486 -fasynchronous-unwind-tables optflags: i586 %{__global_cflags} -m32 -march=i586 -fasynchronous-unwind-tables -optflags: i686 %{__global_cflags} -m32 -march=i686 -mtune=pentium4 -fasynchronous-unwind-tables +optflags: i686 %{__global_cflags} -m32 -march=i686 -mtune=generic -fasynchronous-unwind-tables optflags: athlon %{__global_cflags} -m32 -march=athlon -fasynchronous-unwind-tables optflags: ia64 %{__global_cflags} -optflags: x86_64 %{__global_cflags} -m64 -mtune=nocona +optflags: x86_64 %{__global_cflags} -m64 -mtune=generic optflags: alpha %{__global_cflags} -mieee optflags: alphaev5 %{__global_cflags} -mieee -mcpu=ev5 From 97a32887d64bc2cbc7b6f04a07cb8f13544934bd Mon Sep 17 00:00:00 2001 From: Jon Masters Date: Thu, 12 Oct 2006 03:33:42 +0000 Subject: [PATCH 105/213] Update upstream redhat-rpm-config release. --- find-provides | 31 +++++++++++++++++ find-provides.ksyms | 9 +++++ find-requires | 31 +++++++++++++++++ find-requires.ksyms | 48 ++++++++++++++++++++++++++ redhat-rpm-config.spec | 17 +++++++++- rpmsort | 76 ++++++++++++++++++++++++++++++++++++++++++ symset-table | 35 +++++++++++++++++++ 7 files changed, 246 insertions(+), 1 deletion(-) create mode 100755 find-provides.ksyms create mode 100755 find-requires.ksyms create mode 100755 rpmsort create mode 100755 symset-table diff --git a/find-provides b/find-provides index f0a5624..9aac576 100755 --- a/find-provides +++ b/find-provides @@ -3,6 +3,11 @@ # This script reads filenames from STDIN and outputs any relevant provides # information that needs to be included in the package. +if [ "$1" ] +then + package_name = "$1" +fi + [ -z "$OBJDUMP" ] && OBJDUMP=objdump filelist=`sed "s/['\"]/\\\&/g"` @@ -70,4 +75,30 @@ done | sort -u [ -x /usr/lib/rpm/redhat/find-provides.pkgconfig ] && echo $filelist | tr '[:blank:]' \\n | /usr/lib/rpm/redhat/find-provides.pkgconfig | sort -u +# +# --- Kernel module imported symbols +# +# Since we don't (yet) get passed the name of the package being built, we +# cheat a little here by looking first for a kernel, then for a kmod. +# + +is_kmod=1 +for f in $filelist; do + if [ $(echo "$f" | sed -r -ne 's:^.*/lib/modules/(.*)/(.*).ko$:\2:p') ] + then + is_kernel=1; + fi + if [ $(echo "$f" | sed -r -ne 's:^.*/boot/(.*):\1:p') ] + then + unset is_kmod; + fi +done +if [ ! "$is_kernel" ] || [ "$package_name" == "kernel" ] +then + unset is_kmod +fi + +[ -x /usr/lib/rpm/redhat/find-provides.ksyms ] && [ "$is_kmod" ] && + printf "%s\n" "${filelist[@]}" | /usr/lib/rpm/redhat/find-provides.ksyms + exit 0 diff --git a/find-provides.ksyms b/find-provides.ksyms new file mode 100755 index 0000000..4616710 --- /dev/null +++ b/find-provides.ksyms @@ -0,0 +1,9 @@ +#! /bin/sh + +IFS=$'\n' + +for module in $(grep -E '/lib/modules/.+\.ko$'); do + nm $module \ + | sed -r -ne 's:^0*([0-9a-f]+) A __crc_(.+):ksym(\2) = \1:p' +done \ +| sort -u diff --git a/find-requires b/find-requires index d22f10c..140ea22 100755 --- a/find-requires +++ b/find-requires @@ -5,6 +5,11 @@ # sonames, script interpreters, and perl modules. # +if [ "$1" ] +then + package_name = "$1" +fi + ulimit -c 0 # @@ -132,4 +137,30 @@ done | sort -u [ -x /usr/lib/rpm/redhat/tcl.req -a -n "$tcllist" ] && \ echo $tcllist | tr '[:blank:]' \\n | /usr/lib/rpm/redhat/tcl.req | sort -u +# +# --- Kernel module imported symbols +# +# Since we don't (yet) get passed the name of the package being built, we +# cheat a little here by looking first for a kernel, then for a kmod. +# + +is_kmod=1 +for f in $filelist; do + if [ $(echo "$f" | sed -r -ne 's:^.*/lib/modules/(.*)/(.*).ko$:\2:p') ] + then + is_kernel=1; + fi + if [ $(echo "$f" | sed -r -ne 's:^.*/boot/(.*):\1:p') ] + then + unset is_kmod; + fi +done +if [ ! "$is_kernel" ] || [ "$package_name" == "kernel" ] +then + unset is_kmod +fi + +[ -x /usr/lib/rpm/redhat/find-requires.ksyms ] && [ "$is_kmod" ] && + printf "%s\n" "${filelist[@]}" | /usr/lib/rpm/redhat/find-requires.ksyms + exit 0 diff --git a/find-requires.ksyms b/find-requires.ksyms new file mode 100755 index 0000000..73525b7 --- /dev/null +++ b/find-requires.ksyms @@ -0,0 +1,48 @@ +#! /bin/bash + +IFS=$'\n' + +all_provides() { + nm "$@" \ + | sed -r -ne 's:^0*([0-9a-f]+) A __crc_(.+):\1\t\2:p' \ + | sort -k2 -u +} + +all_requires() { + for module in "$@"; do + set -- $(/sbin/modinfo -F vermagic "$module" | sed -e 's: .*::' -e q) + /sbin/modprobe --dump-modversions "$module" \ + | sed -r -e 's:^0x0*::' -e 's:$:\t'"$1"':' + done \ + | sort -k2 -u +} + +if ! [ -e /sbin/modinfo -a -e /sbin/modprobe ]; then + cat > /dev/null + exit 0 +fi + +modules=($(grep -E '/lib/modules/.+\.ko$')) +if [ ${#modules[@]} -gt 0 ]; then + symset_table=$(mktemp -t ${0##*/}.XXXXX) + /usr/lib/rpm/redhat/symset-table | sort > $symset_table + + join -t $'\t' -j 1 -a 2 $symset_table <( + # Filter out requirements that we fulfill ourself. + join -t $'\t' -j 2 -v 1 \ + <(all_requires "${modules[@]}") \ + <(all_provides "${modules[@]}") \ + | awk ' + BEGIN { FS = "\t" ; OFS = "\t" } + { print $3 "/" $2 "/" $1 } + ' \ + | sort -u) \ + | sort -u \ + | awk ' + { FS = "\t" ; OFS = "\t" } + NF == 3 { print "kernel(" $2 ") = " $3 + next } + { split($1, arr, "/") + print "ksym(" arr[3] ") = " arr[2] } + ' +fi diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index 0836b66..8e19ea6 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -1,6 +1,6 @@ Summary: Red Hat specific rpm configuration files. Name: redhat-rpm-config -Version: 8.0.40 +Version: 8.0.45 Release: 1 License: GPL Group: Development/System @@ -35,6 +35,21 @@ rm -rf ${RPM_BUILD_ROOT} %{_prefix}/lib/rpm/redhat %changelog +* Sun Jul 30 2006 Jon Masters - 8.0.45-1 +- Fix inverted kernel test. + +* Sun Jul 30 2006 Jon Masters - 8.0.44-1 +- Add a better check for a kernel vs. kmod. + +* Thu Jun 15 2006 Jon Masters - 8.0.43-1 +- Workaround bug in find-requires/find-provides for kmods. + +* Thu Jun 15 2006 Jon Masters - 8.0.42-1 +- Fix a typo in KMP find-requires. + +* Tue Jun 13 2006 Jon Masters - 8.0.41-1 +- Add support for KMP Fedora Extras packaging. + * Fri Feb 3 2006 Jeremy Katz - 8.0.40-1 - use -mtune=generic for x86 and x86_64 diff --git a/rpmsort b/rpmsort new file mode 100755 index 0000000..c8ae298 --- /dev/null +++ b/rpmsort @@ -0,0 +1,76 @@ +#! /usr/bin/perl -w + +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, +# USA. + +use Getopt::Long qw(:config gnu_getopt); + +sub rpm_cmp_versions { + my ($evr1, $evr2) = @_; + + sub _rpm_cmp { + my ($s1, $s2) = @_; + + return defined $s1 <=> defined $s2 + unless defined $s1 && defined $s2; + + my ($r, $x1, $x2); + do { + $s1 =~ s/^[^a-zA-Z0-9]+//; + $s2 =~ s/^[^a-zA-Z0-9]+//; + if ($s1 =~ /^\d/ || $s2 =~ /^\d/) { + $s1 =~ s/^0*(\d*)//; $x1 = $1; + $s2 =~ s/^0*(\d*)//; $x2 = $1; + $r = length $x1 <=> length $x2 || $x1 cmp $x2; + } else { + $s1 =~ s/^([a-zA-Z]*)//; $x1 = $1; + $s2 =~ s/^([a-zA-Z]*)//; $x2 = $1; + return 0 + if $x1 eq '' && $x2 eq ''; + $r = $x1 cmp $x2; + } + } until $r; + return $r; + } + + my ($e1, $v1, $r1) = $evr1 =~ /^(?:(\d*):)?(.*?)(?:-([^-]*))?$/; + my ($e2, $v2, $r2) = $evr2 =~ /^(?:(\d*):)?(.*?)(?:-([^-]*))?$/; + my $r = _rpm_cmp($e1 || 0, $e2 || 0); + $r = _rpm_cmp($v1, $v2) + unless $r; + $r = _rpm_cmp($r1, $r2) + unless $r; + return $r; +} + +my $reorder = sub { return @_ }; +my $key = 0; + +GetOptions ("r|reverse" => sub { $reorder = sub { return reverse @_ } }, + "k|key=i" => \$key) +or do { + print STDERR "Usage\n"; + exit 1; +}; + +if ($key == 0) { + # Sort by entire lines + map { print } &$reorder(sort { rpm_cmp_versions($a, $b) } <>); +} else { + # Sort by field $key + my @data = map { [(split)[$key-1], $_] } <>; + map { print } &$reorder(map { $_->[1] } + sort { rpm_cmp_versions($a->[0], $b->[0]) } @data); +} diff --git a/symset-table b/symset-table new file mode 100755 index 0000000..c94a61c --- /dev/null +++ b/symset-table @@ -0,0 +1,35 @@ +#! /bin/sh + +# Create a table of all symbol sets defined in all /boot/symsets*.tar.gz +# files. +# +# Format: +# kernelrelease/modver/symbol symset symset_hash +# +# This table is needed for computing the appropriate Requires: tags for +# kernel module packages. + +tmpdir=$(mktemp -t -d ${0##*/}.XXXXXX) +trap "cd / ; rm -rf $tmpdir" EXIT +cd $tmpdir + +shopt -s nullglob +for symsets in /boot/symsets-*.tar.gz; do + zcat $symsets \ + | tar xf - +done + +for symsets in *; do + krel=${symsets#symsets-} + for symset in $symsets/*; do + class=${symset##*/} ; class=${class%.*} + hash=${symset##*.} + awk ' + BEGIN { FS = "\t" ; OFS = "\t" } + { sub(/0x0*/, "", $1) + print krel "/" $1 "/" $2, class, hash } + ' krel="$krel" class="$class" hash="$hash" $symset + done +done + +# vim:shiftwidth=4 softtabstop=4 From e053cecd416d037659dd8f933e9f1a3a418e0fa6 Mon Sep 17 00:00:00 2001 From: Jeremy Katz Date: Tue, 19 Jun 2007 15:13:23 +0000 Subject: [PATCH 106/213] add script that does repacking of jar files to avoid multilib conflicts. originally written by Ben Konrath --- brp-java-repack-jars | 95 ++++++++++++++++++++++++++++++++++++++++++++ macros | 1 + 2 files changed, 96 insertions(+) create mode 100644 brp-java-repack-jars diff --git a/brp-java-repack-jars b/brp-java-repack-jars new file mode 100644 index 0000000..e205088 --- /dev/null +++ b/brp-java-repack-jars @@ -0,0 +1,95 @@ +#!/bin/sh + +# If using normal root, avoid changing anything. +if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ]; then + exit 0 +fi + +# If zip is not installed, we can't repack the jars. +if [ ! -x /usr/bin/zip ]; then + exit 0 +fi +if [ ! -x /usr/bin/unzip ]; then + exit 0 +fi + +JARS=`find $RPM_BUILD_ROOT -type f -name \*.jar` +if [ ! -z "$JARS" ]; then + + # make $RPM_BUILD_ROOT/tmp if it doesn't exist + rmtmp=0 + if [ ! -x "$RPM_BUILD_ROOT/tmp" ]; then + mkdir -p $RPM_BUILD_ROOT/tmp + rmtmp=1 + fi + + # unpack every jar, set the date of the files and directories and + # repack the jar + for j in $JARS ; do + JARNAME=`basename $j` + TMPDIR=`mktemp -d -p $RPM_BUILD_ROOT/tmp $JARNAME.tmpdir.XXXXXXXXXX` || exit 1 + JARDIR=`mktemp -d -p $RPM_BUILD_ROOT/tmp $JARNAME.jardir.XXXXXXXXXX` || exit 1 + TIMEREF=`mktemp -p $RPM_BUILD_ROOT/tmp $JARNAME.timeref.XXXXXXXXXX` || exit 1 + + pushd $TMPDIR > /dev/null + /usr/bin/unzip -qq -o $j + rm -f $j + + # Create the directories first. + for d in `find -type d | LC_ALL=C sort`; do + mkdir -p $JARDIR/$d + done + + # Get the modtime from the newest ChangeLog. If the project + # doesn't have a ChangeLog, Jan 1, 1970 will be used. + DATE="1970-01-01 UTC" + + if [ -z $_PACKAGE_BUILD_DIR ]; then + _PACKAGE_BUILD_DIR=$RPM_BUILD_DIR/$RPM_PACKAGE_NAME-$RPM_PACKAGE_VERSION + fi + + if [ -d $_PACKAGE_BUILD_DIR ]; then + CHANGELOGS=`find $_PACKAGE_BUILD_DIR -type f -name ChangeLog` + if [ ! -z "$CHANGELOGS" ]; then + for c in $CHANGELOGS; do + TMPDATE=`stat -c %y $c | cut -d " " -f 1-2` + if [ `date --date="$TMPDATE" +%s` -gt `date --date="$DATE" +%s` ]; then + DATE="$TMPDATE" + fi + done + fi + fi + + # move the contents over to the a new directory in order and set + # the times. + for f in `find -type f | LC_ALL=C sort`; do + cp $f $JARDIR/$f + touch --date="$DATE" $JARDIR/$f + done + popd > /dev/null + + # Set the times of the directories. + touch --date="$DATE" `find $JARDIR -type d` + + # make the jar + pushd $JARDIR > /dev/null + + if [ -n "`find -not -name '.'`" ]; then + find * -not -name '.' | LC_ALL=C sort | /usr/bin/zip -q -X -9 $j -@ + else + # Put the empty jar back + touch $j + fi + popd > /dev/null + + # Cleanup. + rm -rf $TMPDIR + rm -rf $JARDIR + rm -f $TIMEREF + done + + # remove $RPM_BUILD_ROOT/tmp if we created it + if [ $rmtmp -eq 1 ]; then + rm -rf $RPM_BUILD_ROOT/tmp + fi +fi diff --git a/macros b/macros index 4cea385..a717ae1 100644 --- a/macros +++ b/macros @@ -86,6 +86,7 @@ /usr/lib/rpm/redhat/brp-strip-static-archive %{__strip} \ /usr/lib/rpm/redhat/brp-strip-comment-note %{__strip} %{__objdump} \ /usr/lib/rpm/brp-python-bytecompile \ + /usr/lib/rpm/redhat/brp-java-repack-jars \ %{nil} # /usr/lib/rpm/redhat/brp-implant-ident-static From 48c39c99dc02c52d67038cefd7610b24cf79c5f1 Mon Sep 17 00:00:00 2001 From: Jeremy Katz Date: Tue, 19 Jun 2007 15:18:25 +0000 Subject: [PATCH 107/213] patch from jcm to adjust kmod handling --- find-requires | 20 ++++++-------------- symset-table | 5 +++++ 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/find-requires b/find-requires index 140ea22..9d0d179 100755 --- a/find-requires +++ b/find-requires @@ -5,11 +5,6 @@ # sonames, script interpreters, and perl modules. # -if [ "$1" ] -then - package_name = "$1" -fi - ulimit -c 0 # @@ -144,21 +139,18 @@ done | sort -u # cheat a little here by looking first for a kernel, then for a kmod. # -is_kmod=1 +unset is_kmod + for f in $filelist; do if [ $(echo "$f" | sed -r -ne 's:^.*/lib/modules/(.*)/(.*).ko$:\2:p') ] then - is_kernel=1; - fi - if [ $(echo "$f" | sed -r -ne 's:^.*/boot/(.*):\1:p') ] + is_kmod=1; + elif [ $(echo "$f" | sed -r -ne 's:^.*/boot/(.*):\1:p') ] then - unset is_kmod; + unset is_kmod; + break; fi done -if [ ! "$is_kernel" ] || [ "$package_name" == "kernel" ] -then - unset is_kmod -fi [ -x /usr/lib/rpm/redhat/find-requires.ksyms ] && [ "$is_kmod" ] && printf "%s\n" "${filelist[@]}" | /usr/lib/rpm/redhat/find-requires.ksyms diff --git a/symset-table b/symset-table index c94a61c..acc00c3 100755 --- a/symset-table +++ b/symset-table @@ -19,6 +19,11 @@ for symsets in /boot/symsets-*.tar.gz; do | tar xf - done +for symsets in /usr/src/kernels/*/symsets-*.tar.gz; do + zcat $symsets \ + | tar xf - +done + for symsets in *; do krel=${symsets#symsets-} for symset in $symsets/*; do From feffba404a7ca764e403c7f27b4e18da939f4a32 Mon Sep 17 00:00:00 2001 From: Jeremy Katz Date: Tue, 19 Jun 2007 15:21:46 +0000 Subject: [PATCH 108/213] add support for kmps/kmodtool stuff (from jcm) --- kmodtool | 258 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ macros | 64 ++++++++++++++ 2 files changed, 322 insertions(+) create mode 100755 kmodtool diff --git a/kmodtool b/kmodtool new file mode 100755 index 0000000..e14e7a1 --- /dev/null +++ b/kmodtool @@ -0,0 +1,258 @@ +#!/bin/bash + +# kmodtool - Helper script for building kernel module RPMs +# Copyright (c) 2003-2006 Ville Skyttä , +# Thorsten Leemhuis +# Jon Masters +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to +# permit persons to whom the Software is furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice shall be +# included in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +shopt -s extglob + +myprog="kmodtool" +myver="0.10.10_kmp2" +knownvariants=@(BOOT|PAE|@(big|huge)mem|debug|enterprise|kdump|?(large)smp|uml|xen[0U]?(-PAE)|xen) +kmod_name= +kver= +verrel= +variant= +kmp= + +get_verrel () +{ + verrel=${1:-$(uname -r)} + verrel=${verrel%%$knownvariants} +} + +print_verrel () +{ + get_verrel $@ + echo "${verrel}" +} + +get_variant () +{ + get_verrel $@ + variant=${1:-$(uname -r)} + variant=${variant##$verrel} + variant=${variant:-'""'} +} + +print_variant () +{ + get_variant $@ + echo "${variant}" +} + +get_rpmtemplate () +{ + local variant="${1}" + local dashvariant="${variant:+-${variant}}" + case "$verrel" in + *.el*) kdep="kernel${dashvariant}-%{_target_cpu} = ${verrel}" ;; + *.EL*) kdep="kernel${dashvariant}-%{_target_cpu} = ${verrel}" ;; + *) kdep="kernel-%{_target_cpu} = ${verrel}${variant}" ;; + esac + + echo "%package -n kmod-${kmod_name}${dashvariant}" + + if [ -z "$kmp_provides_summary" ]; then + echo "Summary: ${kmod_name} kernel module(s)" + fi + + if [ -z "$kmp_provides_group" ]; then + echo "Group: System Environment/Kernel" + fi + + if [ ! -z "$kmp" ]; then + echo "Version: %{kmp_version}" + echo "Release: %{kmp_release}" + fi + + if [ ! -z "$kmp" ]; then + echo "%global _use_internal_dependency_generator 0" + fi + + cat <= %{?epoch:%{epoch}:}%{version} +Requires(post): /sbin/depmod +Requires(postun): /sbin/depmod +EOF + +if [ "no" != "$kmp_nobuildreqs" ] +then + echo "BuildRequires: kernel${dashvariant}-devel-%{_target_cpu} = ${verrel}" +fi + +if [ "" != "$kmp_override_preamble" ] +then + cat "$kmp_override_preamble" +fi + +cat < /dev/null || : +fi +EOF + + if [ ! -z "$kmp" ]; then + cat < /var/run/rpm-kmod-${kmod_name}${dashvariant}-modules +EOF + + fi + + cat < /dev/null || : +EOF + + if [ ! -z "$kmp" ]; then + cat <&2 + exit 2 + elif [ -z "${kver}" ] ; then + echo "Please provide the kver as second parameter." >&2 + exit 2 + elif [ -z "${verrel}" ] ; then + echo "Couldn't find out the verrel." >&2 + exit 2 + fi + + for variant in "$@" ; do + if [ "default" == "$variant" ]; + then + get_rpmtemplate "" + else + get_rpmtemplate "${variant}" + fi + done +} + +usage () +{ + cat <