Server IP : 103.119.228.120 / Your IP : 18.117.107.78 Web Server : Apache System : Linux v8.techscape8.com 3.10.0-1160.119.1.el7.tuxcare.els2.x86_64 #1 SMP Mon Jul 15 12:09:18 UTC 2024 x86_64 User : nobody ( 99) PHP Version : 5.6.40 Disable Function : shell_exec,symlink,system,exec,proc_get_status,proc_nice,proc_terminate,define_syslog_variables,syslog,openlog,closelog,escapeshellcmd,passthru,ocinum cols,ini_alter,leak,listen,chgrp,apache_note,apache_setenv,debugger_on,debugger_off,ftp_exec,dl,dll,myshellexec,proc_open,socket_bind,proc_close,escapeshellarg,parse_ini_filepopen,fpassthru,exec,passthru,escapeshellarg,escapeshellcmd,proc_close,proc_open,ini_alter,popen,show_source,proc_nice,proc_terminate,proc_get_status,proc_close,pfsockopen,leak,apache_child_terminate,posix_kill,posix_mkfifo,posix_setpgid,posix_setsid,posix_setuid,dl,symlink,shell_exec,system,dl,passthru,escapeshellarg,escapeshellcmd,myshellexec,c99_buff_prepare,c99_sess_put,fpassthru,getdisfunc,fx29exec,fx29exec2,is_windows,disp_freespace,fx29sh_getupdate,fx29_buff_prepare,fx29_sess_put,fx29shexit,fx29fsearch,fx29ftpbrutecheck,fx29sh_tools,fx29sh_about,milw0rm,imagez,sh_name,myshellexec,checkproxyhost,dosyayicek,c99_buff_prepare,c99_sess_put,c99getsource,c99sh_getupdate,c99fsearch,c99shexit,view_perms,posix_getpwuid,posix_getgrgid,posix_kill,parse_perms,parsesort,view_perms_color,set_encoder_input,ls_setcheckboxall,ls_reverse_all,rsg_read,rsg_glob,selfURL,dispsecinfo,unix2DosTime,addFile,system,get_users,view_size,DirFiles,DirFilesWide,DirPrintHTMLHeaders,GetFilesTotal,GetTitles,GetTimeTotal,GetMatchesCount,GetFileMatchesCount,GetResultFiles,fs_copy_dir,fs_copy_obj,fs_move_dir,fs_move_obj,fs_rmdir,SearchText,getmicrotime MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /lib/rpm/redhat/ |
Upload File : |
#!/bin/bash # Date: April 2, 2014 # by Aldy Hernandez # Attempt to fix any "-m elf64ppc" linker checks in configure and # libtool.m4 files. # # This script is meant to run silently as part of rpm's %configure # macro. It either fixes the problem, or we silently ignore it, in # which case it is up to the package maintainer to add support for # ppc64le. # Our two attempts at fixing the problem. PATCH1=/tmp/$$.patch1 PATCH2=/tmp/$$.patch2 cleanup() { rm -f $PATCH1 $PATCH2 } trap cleanup 0 1 2 3 4 5 6 7 8 9 11 13 14 15 # There are two variants in RHEL7 so far. The first version, handled # with $PATCH1, currently handles all but 3 packages. The $PATCH2 # version handles the remnant. # cat > $PATCH1 <<EOF --- configure.orig 2014-03-18 15:56:15.575070238 -0500 +++ configure 2014-03-18 16:05:50.877861163 -0500 @@ -7714,6 +7714,9 @@ x86_64-*linux*) LD="\${LD-ld} -m elf_i386" ;; + ppc64le-*linux*|powerpc64le-*linux*) + LD="\${LD-ld} -m elf32lppclinux" + ;; ppc64-*linux*|powerpc64-*linux*) LD="\${LD-ld} -m elf32ppclinux" ;; @@ -7733,6 +7736,9 @@ x86_64-*linux*) LD="\${LD-ld} -m elf_x86_64" ;; + ppc*le-*linux*|powerpc*le-*linux*) + LD="\${LD-ld} -m elf64lppc" + ;; ppc*-*linux*|powerpc*-*linux*) LD="\${LD-ld} -m elf64ppc" ;; EOF cat > $PATCH2 <<EOF --- configure.orig 2014-03-18 16:35:28.942799967 -0500 +++ configure 2014-03-18 16:34:35.608519090 -0500 @@ -3798,6 +3798,9 @@ x86_64-*linux*) LD="\${LD-ld} -m elf_i386" ;; + ppc64le-*linux*) + LD="\${LD-ld} -m elf32lppclinux" + ;; ppc64-*linux*) LD="\${LD-ld} -m elf32ppclinux" ;; @@ -3814,6 +3817,9 @@ x86_64-*linux*) LD="\${LD-ld} -m elf_x86_64" ;; + ppc*le-*linux*|powerpc*le-*linux*) + LD="\${LD-ld} -m elf64lppc" + ;; ppc*-*linux*|powerpc*-*linux*) LD="\${LD-ld} -m elf64ppc" ;; EOF FILES=`find . -name configure -o -name libtool.m4` for f in $FILES; do # Filter out candidates that already handle ppc64le. if grep -s -e '-m elf64lppc' $f >/dev/null; then continue fi # Filter out candidates that don't handle PPC. if ! grep -s -e '-m elf64ppc' $f >/dev/null; then continue fi echo "Broken -m elf64ppc use in $f should handle elf64lppc." echo "Attempting automatic fix." # Attempt to fix the offended file. basename=`basename $f` dirname=`dirname $f` for p in $PATCH1 $PATCH2; do # This is an all for nothing affair. The patch either # applies entirely clean, or we don't even try. # # Tentatively try either patch cleanly, and if we succeed then # do it for real. pushd $dirname 2>&1 > /dev/null if [ $basename = libtool.m4 ]; then sed s/configure/libtool.m4/ < $p | patch --dry-run --follow-symlinks -l 2>&1 >/dev/null else patch --dry-run --follow-symlinks -l < $p 2>&1 > /dev/null fi if [ $? != 0 ]; then echo -n "$p approach did not work for $dirname/$basename: " pwd # This approach didn't work, try the next one. popd 2>&1 > /dev/null continue fi # Seriously now... if [ $basename = libtool.m4 ]; then # Save the timestamp. cp -p $basename /tmp/tmp.$$ sed s/configure/libtool.m4/ < $p | patch --follow-symlinks -l -s 2>&1 > /dev/null # Use the old timestamp, to avoid anyone noticing changes # to libtool.m4. touch --reference=/tmp/tmp.$$ $basename rm -f /tmp/tmp.$$ else patch --follow-symlinks -l -s < $p 2>&1 > /dev/null fi echo "Fixed $f for ld -m ppc64le support." popd 2>&1 > /dev/null break done done rm -f $PATCH1 $PATCH2