mirror of
https://github.com/apache/nuttx.git
synced 2026-05-23 06:39:01 +08:00
cmake(bugfix):add x86_64 arch cmake loadable mod support
supplementing the implementation of loadable construction for x86 Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
# ##############################################################################
|
||||
# arch/x86_64/src/cmake/elf.cmake
|
||||
#
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
|
||||
# license agreements. See the NOTICE file distributed with this work for
|
||||
# additional information regarding copyright ownership. The ASF licenses this
|
||||
# file to you under the Apache License, Version 2.0 (the "License"); you may not
|
||||
# use this file except in compliance with the License. You may obtain a copy of
|
||||
# the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations under
|
||||
# the License.
|
||||
#
|
||||
# ##############################################################################
|
||||
|
||||
# Loadable and ELF module settings
|
||||
|
||||
nuttx_elf_compile_options(-fvisibility=hidden -fno-pic -mcmodel=large)
|
||||
|
||||
nuttx_elf_link_options(-r)
|
||||
|
||||
nuttx_elf_link_options_ifdef(CONFIG_DEBUG_OPT_UNUSED_SECTIONS --gc-sections)
|
||||
@@ -79,3 +79,10 @@ if(CONFIG_ARCH_HAVE_DEBUG)
|
||||
endif()
|
||||
|
||||
target_sources(arch PRIVATE ${SRCS})
|
||||
|
||||
nuttx_add_aux_library(STARTUP_OBJS crt0.c)
|
||||
|
||||
target_compile_options(
|
||||
STARTUP_OBJS
|
||||
PRIVATE
|
||||
$<GENEX_EVAL:$<TARGET_PROPERTY:nuttx_global,NUTTX_ELF_APP_COMPILE_OPTIONS>>)
|
||||
|
||||
Reference in New Issue
Block a user