gcc中"-Wa,options"的用法是什么?

use*_*003 10 c compiler-construction gcc

我该怎么用

-Wa,选项

在gcc中我可以将所有选项传递给汇编程序.我在哪里可以获得选项列表.- a,-a,-ad是什么意思?我在这里找到

Mik*_*ike 9

请务必查看文档

-Wa,选项
Pass选项作为汇编程序的选项.如果选项包含逗号,则会在逗号中将其拆分为多个选项.

所以在你的情况下-a,-ad并传递给汇编程序,那些取决于你的汇编程序.Gcc不知道如何处理特定于系统的汇编程序选项,因此给它-Wa标记让它知道只是传递任何后续内容.

您还可以通过手册页在本地找到该文档.要打开GNU汇编程序的文档,请执行:

$ man 1 as
Run Code Online (Sandbox Code Playgroud)

它会打开:

AS(1)                        GNU Development Tools                       AS(1)

NAME
       AS - the portable GNU assembler.

SYNOPSIS
       as [-a[cdghlns][=file]] [--alternate] [-D]
        [--compress-debug-sections]  [--nocompress-debug-sections]
        [--debug-prefix-map old=new]
        [--defsym sym=val] [-f] [-g] [--gstabs]
        [--gstabs+] [--gdwarf-2] [--gdwarf-sections]
        [--help] [-I dir] [-J]
        [-K] [-L] [--listing-lhs-width=NUM]
        [--listing-lhs-width2=NUM] [--listing-rhs-width=NUM]
        [--listing-cont-lines=NUM] [--keep-locals] [-o
        objfile] [-R] [--reduce-memory-overheads] [--statistics]
        [-v] [-version] [--version] [-W] [--warn]
        [--fatal-warnings] [-w] [-x] [-Z] [@FILE]
        [--size-check=[error|warning]]
        [--target-help] [target-options]
        [--|files ...]
        ...
Run Code Online (Sandbox Code Playgroud)