about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBarton E. Schaefer <schaefer@zsh.org>2016-02-14 13:11:20 -0800
committerBarton E. Schaefer <schaefer@zsh.org>2016-02-14 13:11:20 -0800
commite3188ff0e80bd9e4515fc50ce8c2e78b3f2f4fdc (patch)
treea221933123ab33f3089329c893827053e89d7497
parent485cbbb6cc6ac9d7c13a8268b3574829026f3797 (diff)
downloadzsh-e3188ff0e80bd9e4515fc50ce8c2e78b3f2f4fdc.tar.gz
zsh-e3188ff0e80bd9e4515fc50ce8c2e78b3f2f4fdc.tar.xz
zsh-e3188ff0e80bd9e4515fc50ce8c2e78b3f2f4fdc.zip
37898: complete gcc linker options
-rw-r--r--ChangeLog2
-rw-r--r--Completion/Unix/Command/_gcc14
2 files changed, 16 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index b0ba429c7..69733632b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2016-02-14  Barton E. Schaefer  <schaefer@zsh.org>
 
+	* 37898: Completion/Unix/Command/_gcc: complete linker options
+	
 	* 37972: Completion/Base/Utility/_arguments,
 	Completion/Base/Widget/_correct_filename,
 	Completion/Base/Widget/_most_recent_file,
diff --git a/Completion/Unix/Command/_gcc b/Completion/Unix/Command/_gcc
index 2c5ffdc8a..1276054db 100644
--- a/Completion/Unix/Command/_gcc
+++ b/Completion/Unix/Command/_gcc
@@ -763,6 +763,20 @@ args+=(
   '-fpack-struct=-[Set initial maximum structure member alignment]:alignment: '
 )
 
+# More linker options, from gcc man pages
+args+=(
+  '-nostartfiles[Do not use the standard system startup files when linking]'
+  '-nodefaultlibs[Do not use the standard system libraries when linking]'
+  '-nostdlib[Do not use the standard system startup files or libraries when linking]'
+  '-rdynamic[Pass the flag -export-dynamic to the ELF linker, on targets that support it]'
+  '-s[Remove all symbol table and relocation information from the executable]'
+  '-static[On systems that support dynamic linking, this prevents linking with the shared libraries]'
+  '-shared-libgcc[Force shared libgcc]'
+  '-static-libgcc[Force static libgcc]'
+  '-symbolic[Bind references to global symbols when building a shared object.]'
+  '-T:linker script:_files'
+)
+
 # other common options, gcc --help=warnings --help=optimizers --help=common|sed 1,/language-independent/d
 args+=(
 # | grep -v ::