Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 26 Jun 2019 00:44:55 +0000 (UTC)
From:      Bryan Drewery <bdrewery@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r505129 - head/Mk/Scripts
Message-ID:  <201906260044.x5Q0it4I053549@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bdrewery
Date: Wed Jun 26 00:44:55 2019
New Revision: 505129
URL: https://svnweb.freebsd.org/changeset/ports/505129

Log:
  Allow generate-symbols.sh to actually work.
  
  It splits out symbols to PREFIX as well not LOCALBASE. Fix
  check-stagedir.sh for that.

Modified:
  head/Mk/Scripts/check-stagedir.sh
  head/Mk/Scripts/generate-symbols.sh

Modified: head/Mk/Scripts/check-stagedir.sh
==============================================================================
--- head/Mk/Scripts/check-stagedir.sh	Tue Jun 25 21:41:54 2019	(r505128)
+++ head/Mk/Scripts/check-stagedir.sh	Wed Jun 26 00:44:55 2019	(r505129)
@@ -95,14 +95,14 @@ setup_plist_seds() {
 	unset PLIST_SUB_SED
 	# Used for generate_plist
 	sed_files_gen="${sed_portdocsexamples} /^share\/licenses/d; \
-	    \#${LOCALBASE}/lib/debug#d;"
+	    \#${PREFIX}/lib/debug#d;"
 	sed_dirs_gen="s,^,@dir ,; \
 	    ${sed_portdocsexamples} \
 	    /^@dir share\/licenses/d;"
 
 	# These prevent ignoring DOCS/EXAMPLES dirs with sed_portdocsexamples
 	sed_files="/^share\/licenses/d; \
-	    \#${LOCALBASE}/lib/debug#d;"
+	    \#${PREFIX}/lib/debug#d;"
 	sed_dirs="s,^,@dir ,; \
 	    /^@dir share\/licenses/d;"
 

Modified: head/Mk/Scripts/generate-symbols.sh
==============================================================================
--- head/Mk/Scripts/generate-symbols.sh	Tue Jun 25 21:41:54 2019	(r505128)
+++ head/Mk/Scripts/generate-symbols.sh	Wed Jun 26 00:44:55 2019	(r505129)
@@ -17,7 +17,7 @@ find ${STAGEDIR} -type f \
     > ${ELF_FILES}
 
 # Create all of the /usr/local/lib/* dirs
-lib_dir="${STAGEDIR}.debug${PREFIX}/lib/debug"
+lib_dir="${STAGEDIR}${PREFIX}/lib/debug"
 sed -e "s,^${STAGEDIR}${PREFIX}/,${lib_dir}/," -e 's,/[^/]*$,,' \
     ${ELF_FILES} | sort -u | xargs mkdir -p
 
@@ -27,13 +27,12 @@ while read -r staged_elf_file; do
 	# Strip off filename
 	lib_dir_dest="${lib_dir_dest%/*}"
 	# Save symbols to f.debug
-	objcopy --only-keep-debug "${staged_elf_file}" \
-	    "${lib_dir_dest}/${elf_file_name}.debug"
+	debug_file_name="${lib_dir_dest}/${elf_file_name}.debug"
+	objcopy --only-keep-debug "${staged_elf_file}" "${debug_file_name}"
 	# Strip and add a reference to f.debug for finding the symbols.
 	objcopy --strip-debug --strip-unneeded \
-	    --add-gnu-debuglink="${lib_dir_dest}/${elf_file_name}.debug" \
-	    "${staged_elf_file}"
+	    --add-gnu-debuglink="${debug_file_name}" "${staged_elf_file}"
 	msg "Saved symbols for ${staged_elf_file}"
-done < ${ELF_FILES}
+done < ${ELF_FILES} 3>> ${TMPPLIST}
 
 rm -f ${ELF_FILES}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201906260044.x5Q0it4I053549>