C/C++ Compiler Manual for SHARC® Processors
Total Page:16
File Type:pdf, Size:1020Kb
1.1 C/C++ Compiler Manual for SHARC® Processors Revision 1.2, May 2014 Part Number 82-100117-01 Analog Devices, Inc. One Technology Way Norwood, Mass. 02062-9106 a Copyright Information ©2014 Analog Devices, Inc., ALL RIGHTS RESERVED. This document may not be reproduced in any form without prior, express written consent from Analog Devices, Inc. Printed in the USA. Disclaimer Analog Devices, Inc. reserves the right to change this product without prior notice. Information furnished by Analog Devices is believed to be accurate and reliable. However, no responsibility is assumed by Analog Devices for its use; nor for any infringement of patents or other rights of third parties which may result from its use. No license is granted by impli- cation or otherwise under the patent rights of Analog Devices, Inc. Trademark and Service Mark Notice The Analog Devices logo, CrossCore, EngineerZone, SHARC, and VisualDSP++ are registered trademarks of Analog Devices, Inc. All other brand and product names are trademarks or service marks of their respective owners. CONTENTS PREFACE Purpose of This Manual ........................................................... xxxix Intended Audience ................................................................... xxxix Manual Contents .......................................................................... xl What’s New in This Manual .......................................................... xl Technical Support ........................................................................ xli Supported Processors ................................................................... xlii Product Information ................................................................... xlii Analog Devices Web Site ....................................................... xlii EngineerZone ....................................................................... xliii Notation Conventions ................................................................. xliv COMPILER C/C++ Compiler Overview ........................................................... 1-3 Compiler Components ............................................................ 1-5 Compiler Command-Line Interface ............................................... 1-7 Running the Compiler ............................................................. 1-8 Compiler Command-Line Switches ............................................... 1-9 C/C++ Compiler Switch Summaries .................................. 1-10 CrossCore Embedded Studio 1.1 iii C/C++ Compiler Manual for SHARC Processors Contents C/C++ Mode Selection Switch Descriptions ...................... 1-24 -c89 ............................................................................. 1-24 -c99 ............................................................................. 1-24 -c++ ............................................................................. 1-25 C/C++ Compiler Common Switch Descriptions ................ 1-25 sourcefile ...................................................................... 1-25 -@ filename .................................................................. 1-25 -A name[tokens] ........................................................... 1-26 -add-debug-libpaths ...................................................... 1-27 -aligned-stack ............................................................... 1-27 -alttok .......................................................................... 1-27 -always-inline ............................................................... 1-28 -annotate ...................................................................... 1-28 -annotate-loop-instr ...................................................... 1-29 -asms-safe-in-simd-for-loops ......................................... 1-29 -auto-attrs .................................................................... 1-29 -build-lib ...................................................................... 1-30 -C ................................................................................ 1-30 -c ................................................................................. 1-30 -compatible-pm-dm ...................................................... 1-30 -component file.xml ...................................................... 1-30 -const-read-write .......................................................... 1-30 -const-strings ................................................................ 1-31 -D macro[=definition] ................................................. 1-31 iv CrossCore Embedded Studio 1.1 C/C++ Compiler Manual for SHARC Processors Contents -dependency-add-target target ....................................... 1-31 -double-size[-32|-64] ..................................................... 1-32 -double-size-any ............................................................ 1-32 -dry .............................................................................. 1-33 -dryrun ......................................................................... 1-33 -E ................................................................................. 1-33 -ED .............................................................................. 1-33 -EE ............................................................................... 1-33 -eh ................................................................................ 1-33 -enum-is-int .................................................................. 1-34 -extra-keywords ............................................................. 1-35 -extra-precision ............................................................. 1-35 -file-attr name[=value] .................................................. 1-36 -flags -{asm|compiler|ipa|lib|link|mem|prelink} switch [,switch2 [,...]] ......................................... 1-36 -float-to-int ................................................................... 1-37 -force-circbuf ................................................................ 1-37 -fp-associative ............................................................... 1-38 -full-version .................................................................. 1-38 -fx-contract ................................................................... 1-38 -fx-rounding-mode-biased ............................................. 1-38 -fx-rounding-mode-truncation ....................................... 1-38 -fx-rounding-mode-unbiased ......................................... 1-39 -g .................................................................................. 1-39 -glite ............................................................................. 1-39 CrossCore Embedded Studio 1.1 v C/C++ Compiler Manual for SHARC Processors Contents -gnu-style-dependencies ................................................ 1-40 -H ................................................................................ 1-40 -HH ............................................................................. 1-40 -h[elp] .......................................................................... 1-41 -I directory [{,|;} directory...] ............................. 1-41 -I- ................................................................................ 1-41 -i .................................................................................. 1-42 -include filename ......................................................... 1-42 -ipa .............................................................................. 1-42 -L directory[{;|,}directory…] ................................... 1-43 -l library ..................................................................... 1-43 -linear-simd .................................................................. 1-44 -list-workarounds .......................................................... 1-44 -loop-simd .................................................................... 1-44 -M ............................................................................... 1-44 -MD ............................................................................ 1-45 -MM ............................................................................ 1-45 -Mo filename ............................................................... 1-45 -Mt name ...................................................................... 1-45 -map filename .............................................................. 1-45 -mem ........................................................................... 1-46 -multiline ..................................................................... 1-46 -never-inline ................................................................. 1-46 -no-aligned-stack .......................................................... 1-47 vi CrossCore Embedded Studio 1.1 C/C++ Compiler Manual for SHARC Processors Contents -no-alttok ..................................................................... 1-47 -no-annotate ................................................................. 1-47 -no-annotate-loop-instr ................................................. 1-47 -no-assume-vols-are-iops ............................................... 1-48 -no-auto-attrs ................................................................ 1-48 -no-circbuf .................................................................... 1-48 -no-const-strings ........................................................... 1-48 -no-db .......................................................................... 1-49 -no-defs .......................................................................