[arch-commits] Commit in arm-none-eabi-gcc/trunk (PKGBUILD)

Filipe Laíns ffy00 at archlinux.org
Sat Mar 21 19:09:46 UTC 2020


    Date: Saturday, March 21, 2020 @ 19:09:42
  Author: ffy00
Revision: 603027

quote $srcdir and $pkgdir

Modified:
  arm-none-eabi-gcc/trunk/PKGBUILD

----------+
 PKGBUILD |   22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-03-21 19:09:30 UTC (rev 603026)
+++ PKGBUILD	2020-03-21 19:09:42 UTC (rev 603027)
@@ -40,11 +40,11 @@
   # hack! - some configure tests for header files using "$CPP $CPPFLAGS"
   sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" {libiberty,gcc}/configure
 
-  mkdir $srcdir/build-{gcc,gcc-nano}
+  mkdir "$srcdir"/build-{gcc,gcc-nano}
 }
 
 _build_gcc() {
-  $srcdir/$_basedir/configure \
+  "$srcdir"/$_basedir/configure \
     --target=$_target \
     --prefix=/usr \
     --with-sysroot=/usr/$_target \
@@ -84,13 +84,13 @@
 }
 
 build() {
-  cd $srcdir/build-gcc
+  cd "$srcdir"/build-gcc
   export CFLAGS_FOR_TARGET='-g -Os -ffunction-sections -fdata-sections'
   export CXXFLAGS_FOR_TARGET='-g -Os -ffunction-sections -fdata-sections'
   _build_gcc
 
   # Build libstdc++ without exceptions support (the 'nano' variant)
-  cd $srcdir/build-gcc-nano
+  cd "$srcdir"/build-gcc-nano
   export CFLAGS_FOR_TARGET='-g -Os -ffunction-sections -fdata-sections -fno-exceptions'
   export CXXFLAGS_FOR_TARGET='-g -Os -ffunction-sections -fdata-sections -fno-exceptions'  
   _build_gcc
@@ -97,19 +97,19 @@
 }
 
 package() {
-  cd $srcdir/build-gcc
+  cd "$srcdir"/build-gcc
   make DESTDIR="$pkgdir" install -j1
 
-  cd $srcdir/build-gcc-nano
+  cd "$srcdir"/build-gcc-nano
   make DESTDIR="$pkgdir.nano" install -j1
   # we need only libstdc nano files
-  multilibs=( $($pkgdir/usr/bin/$_target-gcc -print-multi-lib 2>/dev/null) )
+  multilibs=( $("$pkgdir"/usr/bin/$_target-gcc -print-multi-lib 2>/dev/null) )
   for multilib in "${multilibs[@]}"; do
     dir="${multilib%%;*}"
-    from_dir=$pkgdir.nano/usr/$_target/lib/$dir
-    to_dir=$pkgdir/usr/$_target/lib/$dir
-    cp -f $from_dir/libstdc++.a $to_dir/libstdc++_nano.a
-    cp -f $from_dir/libsupc++.a $to_dir/libsupc++_nano.a
+    from_dir="$pkgdir".nano/usr/$_target/lib/"$dir"
+    to_dir="$pkgdir"/usr/$_target/lib/"$dir"
+    cp -f "$from_dir"/libstdc++.a "$to_dir"/libstdc++_nano.a
+    cp -f "$from_dir"/libsupc++.a "$to_dir"/libsupc++_nano.a
   done
 
   # strip target binaries



More information about the arch-commits mailing list